Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: net/base/load_states_list.h

Issue 2519473002: Fixes the cache lock issue. (Closed)
Patch Set: Feedback incorporated (Rebased till refs/heads/master@{#446065}) Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the list of load states and their values. For the enum values, 5 // This is the list of load states and their values. For the enum values,
6 // include the file "net/base/load_states.h". 6 // include the file "net/base/load_states.h".
7 // 7 //
8 // Here we define the values using a macro LOAD_STATE, so it can be 8 // Here we define the values using a macro LOAD_STATE, so it can be
9 // expanded differently in some places (for example, to automatically 9 // expanded differently in some places (for example, to automatically
10 // map a load flag value to its symbolic name). 10 // map a load flag value to its symbolic name).
(...skipping 21 matching lines...) Expand all
32 32
33 // This state indicates that the URLRequest delegate has chosen to block this 33 // This state indicates that the URLRequest delegate has chosen to block this
34 // request before it was sent over the network. When in this state, the 34 // request before it was sent over the network. When in this state, the
35 // delegate should set a load state parameter on the URLRequest describing 35 // delegate should set a load state parameter on the URLRequest describing
36 // the nature of the delay (i.e. "Waiting for <description given by 36 // the nature of the delay (i.e. "Waiting for <description given by
37 // delegate>"). 37 // delegate>").
38 LOAD_STATE(WAITING_FOR_DELEGATE, 4) 38 LOAD_STATE(WAITING_FOR_DELEGATE, 4)
39 39
40 // This state corresponds to a resource load that is blocked waiting for 40 // This state corresponds to a resource load that is blocked waiting for
41 // access to a resource in the cache. If multiple requests are made for the 41 // access to a resource in the cache. If multiple requests are made for the
42 // same resource, the first request will be responsible for writing (or 42 // same resource, the requests eligible for shared writing among them will be
jkarlin 2017/02/03 18:26:19 I don't know that we want to mention shared writer
shivanisha 2017/02/06 21:14:10 Sounds good.
43 // updating) the cache entry and the second request will be deferred until 43 // responsible for writing (or updating) the cache entry and the remaining
44 // the first completes. This may be done to optimize for cache reuse. 44 // requests will be deferred until the writing completes.
45 LOAD_STATE(WAITING_FOR_CACHE, 5) 45 LOAD_STATE(WAITING_FOR_CACHE, 5)
46 46
47 // This state corresponds to a resource load that is blocked waiting for 47 // This state corresponds to a resource load that is blocked waiting for
48 // access to a resource in the AppCache. 48 // access to a resource in the AppCache.
49 // Note: This is a layering violation, but being the only one it's not that 49 // Note: This is a layering violation, but being the only one it's not that
50 // bad. TODO(rvargas): Reconsider what to do if we need to add more. 50 // bad. TODO(rvargas): Reconsider what to do if we need to add more.
51 LOAD_STATE(WAITING_FOR_APPCACHE, 6) 51 LOAD_STATE(WAITING_FOR_APPCACHE, 6)
52 52
53 // This state corresponds to a resource being blocked waiting for the 53 // This state corresponds to a resource being blocked waiting for the
54 // PAC script to be downloaded. 54 // PAC script to be downloaded.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // corresponds to the period after the request is sent and before all of the 93 // corresponds to the period after the request is sent and before all of the
94 // response headers have been received. 94 // response headers have been received.
95 LOAD_STATE(WAITING_FOR_RESPONSE, 15) 95 LOAD_STATE(WAITING_FOR_RESPONSE, 15)
96 96
97 // This state corresponds to a resource load that is blocked waiting for a 97 // This state corresponds to a resource load that is blocked waiting for a
98 // read to complete. In the case of a HTTP transaction, this corresponds to 98 // read to complete. In the case of a HTTP transaction, this corresponds to
99 // the period after the response headers have been received and before all of 99 // the period after the response headers have been received and before all of
100 // the response body has been downloaded. (NOTE: This state only applies for 100 // the response body has been downloaded. (NOTE: This state only applies for
101 // an URLRequest while there is an outstanding Read operation.) 101 // an URLRequest while there is an outstanding Read operation.)
102 LOAD_STATE(READING_RESPONSE, 16) 102 LOAD_STATE(READING_RESPONSE, 16)
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/http/http_cache.h » ('j') | net/http/http_cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698