load_states_list.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // This file intentionally does not have header guards, it's included
  5. // inside a macro to generate enum values. The following line silences a
  6. // presubmit and Tricium warning that would otherwise be triggered by this:
  7. // no-include-guard-because-multiply-included
  8. // NOLINT(build/header_guard)
  9. // This is the list of load states and their values. For the enum values,
  10. // include the file "net/base/load_states.h".
  11. //
  12. // Here we define the values using a macro LOAD_STATE, so it can be
  13. // expanded differently in some places (for example, to automatically
  14. // map a load flag value to its symbolic name).
  15. // This is the default state. It corresponds to a resource load that has
  16. // either not yet begun or is idle waiting for the consumer to do something
  17. // to move things along (e.g., the consumer of an URLRequest may not have
  18. // called Read yet).
  19. LOAD_STATE(IDLE, 0)
  20. // When a socket pool group is below the maximum number of sockets allowed per
  21. // group, but a new socket cannot be created due to the per-pool socket limit,
  22. // this state is returned by all requests for the group waiting on an idle
  23. // connection, except those that may be serviced by a pending new connection.
  24. LOAD_STATE(WAITING_FOR_STALLED_SOCKET_POOL, 1)
  25. // When a socket pool group has reached the maximum number of sockets allowed
  26. // per group, this state is returned for all requests that don't have a socket,
  27. // except those that correspond to a pending new connection.
  28. LOAD_STATE(WAITING_FOR_AVAILABLE_SOCKET, 2)
  29. // This state indicates that the URLRequest delegate has chosen to block this
  30. // request before it was sent over the network. When in this state, the
  31. // delegate should set a load state parameter on the URLRequest describing
  32. // the nature of the delay (i.e. "Waiting for <description given by
  33. // delegate>").
  34. LOAD_STATE(WAITING_FOR_DELEGATE, 3)
  35. // This state corresponds to a resource load that is blocked waiting for
  36. // access to a resource in the cache. If multiple requests are made for the
  37. // same resource, the first request will be responsible for writing (or
  38. // updating) the cache entry and the second request will be deferred until
  39. // the first completes. This may be done to optimize for cache reuse.
  40. LOAD_STATE(WAITING_FOR_CACHE, 4)
  41. // This state was used to wait for access to a resource in the AppCache but
  42. // AppCache is no longer supported.
  43. LOAD_STATE(OBSOLETE_WAITING_FOR_APPCACHE, 5)
  44. // This state corresponds to a resource being blocked waiting for the
  45. // PAC script to be downloaded.
  46. LOAD_STATE(DOWNLOADING_PAC_FILE, 6)
  47. // This state corresponds to a resource load that is blocked waiting for a
  48. // proxy autoconfig script to return a proxy server to use.
  49. LOAD_STATE(RESOLVING_PROXY_FOR_URL, 7)
  50. // This state corresponds to a resource load that is blocked waiting for a
  51. // proxy autoconfig script to return a proxy server to use, but that proxy
  52. // script is busy resolving the IP address of a host.
  53. LOAD_STATE(RESOLVING_HOST_IN_PAC_FILE, 8)
  54. // This state indicates that we're in the process of establishing a tunnel
  55. // through the proxy server.
  56. LOAD_STATE(ESTABLISHING_PROXY_TUNNEL, 9)
  57. // This state corresponds to a resource load that is blocked waiting for a
  58. // host name to be resolved. This could either indicate resolution of the
  59. // origin server corresponding to the resource or to the host name of a proxy
  60. // server used to fetch the resource.
  61. LOAD_STATE(RESOLVING_HOST, 10)
  62. // This state corresponds to a resource load that is blocked waiting for a
  63. // TCP connection (or other network connection) to be established. HTTP
  64. // requests that reuse a keep-alive connection skip this state.
  65. LOAD_STATE(CONNECTING, 11)
  66. // This state corresponds to a resource load that is blocked waiting for the
  67. // SSL handshake to complete.
  68. LOAD_STATE(SSL_HANDSHAKE, 12)
  69. // This state corresponds to a resource load that is blocked waiting to
  70. // completely upload a request to a server. In the case of a HTTP POST
  71. // request, this state includes the period of time during which the message
  72. // body is being uploaded.
  73. LOAD_STATE(SENDING_REQUEST, 13)
  74. // This state corresponds to a resource load that is blocked waiting for the
  75. // response to a network request. In the case of a HTTP transaction, this
  76. // corresponds to the period after the request is sent and before all of the
  77. // response headers have been received.
  78. LOAD_STATE(WAITING_FOR_RESPONSE, 14)
  79. // This state corresponds to a resource load that is blocked waiting for a
  80. // read to complete. In the case of a HTTP transaction, this corresponds to
  81. // the period after the response headers have been received and before all of
  82. // the response body has been downloaded. (NOTE: This state only applies for
  83. // an URLRequest while there is an outstanding Read operation.)
  84. LOAD_STATE(READING_RESPONSE, 15)