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

Side by Side Diff: net/http/http_response_info.h

Issue 12310075: Cache failover to LOAD_PREFERRING_CACHE if network response suggests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed vestigial reference to new content flag. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_ 5 #ifndef NET_HTTP_HTTP_RESPONSE_INFO_H_
6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_ 6 #define NET_HTTP_HTTP_RESPONSE_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool was_fetched_via_spdy; 52 bool was_fetched_via_spdy;
53 53
54 // True if the npn was negotiated for this request. 54 // True if the npn was negotiated for this request.
55 bool was_npn_negotiated; 55 bool was_npn_negotiated;
56 56
57 // True if the request was fetched via an explicit proxy. The proxy could 57 // True if the request was fetched via an explicit proxy. The proxy could
58 // be any type of proxy, HTTP or SOCKS. Note, we do not know if a 58 // be any type of proxy, HTTP or SOCKS. Note, we do not know if a
59 // transparent proxy may have been involved. 59 // transparent proxy may have been involved.
60 bool was_fetched_via_proxy; 60 bool was_fetched_via_proxy;
61 61
62 // True if the request was fetched from cache rather than the network
63 // because of a LOAD_PREFERRING_CACHE or LOAD_CACHE_RETURN_IF_OFFLINE
rvargas (doing something else) 2013/03/05 02:58:19 Why set a flag when the request is issued with LOA
Randy Smith (Not in Mondays) 2013/03/05 23:16:14 Well, that answers another question I asked you :-
64 // flag.
65 bool was_cache_override;
rvargas (doing something else) 2013/03/05 02:58:19 nit: move after was_cached, and maybe convey inste
Randy Smith (Not in Mondays) 2013/03/05 23:16:14 Done, though I phrased it as "was unable to contac
rvargas (doing something else) 2013/03/06 03:11:48 yes, I think it is better to change the name too.
Randy Smith (Not in Mondays) 2013/03/06 22:55:55 SG. I used "server_data_unavailable"; let me know
66
62 // Remote address of the socket which fetched this resource. 67 // Remote address of the socket which fetched this resource.
63 // 68 //
64 // NOTE: If the response was served from the cache (was_cached is true), 69 // NOTE: If the response was served from the cache (was_cached is true),
65 // the socket address will be set to the address that the content came from 70 // the socket address will be set to the address that the content came from
66 // originally. This is true even if the response was re-validated using a 71 // originally. This is true even if the response was re-validated using a
67 // different remote address, or if some of the content came from a byte-range 72 // different remote address, or if some of the content came from a byte-range
68 // request to a different address. 73 // request to a different address.
69 HostPortPair socket_address; 74 HostPortPair socket_address;
70 75
71 // Protocol negotiated with the server. 76 // Protocol negotiated with the server.
(...skipping 26 matching lines...) Expand all
98 // The "Vary" header data for this response. 103 // The "Vary" header data for this response.
99 HttpVaryData vary_data; 104 HttpVaryData vary_data;
100 105
101 // Any metadata asociated with this resource's cached data. 106 // Any metadata asociated with this resource's cached data.
102 scoped_refptr<IOBufferWithSize> metadata; 107 scoped_refptr<IOBufferWithSize> metadata;
103 }; 108 };
104 109
105 } // namespace net 110 } // namespace net
106 111
107 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ 112 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698