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

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: Incorporated comments. 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
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52
53 // The following is only defined if the request_time member is set. 53 // The following is only defined if the request_time member is set.
54 // If this response was resurrected from cache, then this bool is set, and 54 // If this response was resurrected from cache, then this bool is set, and
55 // request_time may corresponds to a time "far" in the past. Note that 55 // request_time may corresponds to a time "far" in the past. Note that
56 // stale content (perhaps un-cacheable) may be fetched from cache subject to 56 // stale content (perhaps un-cacheable) may be fetched from cache subject to
57 // the load flags specified on the request info. For example, this is done 57 // the load flags specified on the request info. For example, this is done
58 // when a user presses the back button to re-render pages, or at startup, 58 // when a user presses the back button to re-render pages, or at startup,
59 // when reloading previously visited pages (without going over the network). 59 // when reloading previously visited pages (without going over the network).
60 bool was_cached; 60 bool was_cached;
61 61
62 // True if the request was fetched from cache rather than the network
63 // because of a LOAD_FROM_CACHE_IF_OFFLINE flag when the system
64 // was unable to contact the server.
65 bool server_data_unavailable;
66
62 // True if the request was fetched over a SPDY channel. 67 // True if the request was fetched over a SPDY channel.
63 bool was_fetched_via_spdy; 68 bool was_fetched_via_spdy;
64 69
65 // True if the npn was negotiated for this request. 70 // True if the npn was negotiated for this request.
66 bool was_npn_negotiated; 71 bool was_npn_negotiated;
67 72
68 // True if the request was fetched via an explicit proxy. The proxy could 73 // True if the request was fetched via an explicit proxy. The proxy could
69 // be any type of proxy, HTTP or SOCKS. Note, we do not know if a 74 // be any type of proxy, HTTP or SOCKS. Note, we do not know if a
70 // transparent proxy may have been involved. 75 // transparent proxy may have been involved.
71 bool was_fetched_via_proxy; 76 bool was_fetched_via_proxy;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // The "Vary" header data for this response. 117 // The "Vary" header data for this response.
113 HttpVaryData vary_data; 118 HttpVaryData vary_data;
114 119
115 // Any metadata asociated with this resource's cached data. 120 // Any metadata asociated with this resource's cached data.
116 scoped_refptr<IOBufferWithSize> metadata; 121 scoped_refptr<IOBufferWithSize> metadata;
117 }; 122 };
118 123
119 } // namespace net 124 } // namespace net
120 125
121 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_ 126 #endif // NET_HTTP_HTTP_RESPONSE_INFO_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698