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

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

Issue 12886022: Implement offline mode behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Setup OfflinePolicy for all started requests. Created 7 years, 8 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_response_info.h ('k') | net/http/http_transaction_unittest.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) 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 #include "net/http/http_response_info.h" 5 #include "net/http/http_response_info.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "net/base/auth.h" 10 #include "net/base/auth.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // This bit is set if the request has http authentication. 87 // This bit is set if the request has http authentication.
88 RESPONSE_INFO_USE_HTTP_AUTHENTICATION = 1 << 19, 88 RESPONSE_INFO_USE_HTTP_AUTHENTICATION = 1 << 19,
89 89
90 // TODO(darin): Add other bits to indicate alternate request methods. 90 // TODO(darin): Add other bits to indicate alternate request methods.
91 // For now, we don't support storing those. 91 // For now, we don't support storing those.
92 }; 92 };
93 93
94 HttpResponseInfo::HttpResponseInfo() 94 HttpResponseInfo::HttpResponseInfo()
95 : was_cached(false), 95 : was_cached(false),
96 server_data_unavailable(false), 96 server_data_unavailable(false),
97 network_accessed(false),
97 was_fetched_via_spdy(false), 98 was_fetched_via_spdy(false),
98 was_npn_negotiated(false), 99 was_npn_negotiated(false),
99 was_fetched_via_proxy(false), 100 was_fetched_via_proxy(false),
100 did_use_http_auth(false), 101 did_use_http_auth(false),
101 connection_info(CONNECTION_INFO_UNKNOWN) { 102 connection_info(CONNECTION_INFO_UNKNOWN) {
102 } 103 }
103 104
104 HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs) 105 HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs)
105 : was_cached(rhs.was_cached), 106 : was_cached(rhs.was_cached),
106 server_data_unavailable(rhs.server_data_unavailable), 107 server_data_unavailable(rhs.server_data_unavailable),
108 network_accessed(rhs.network_accessed),
107 was_fetched_via_spdy(rhs.was_fetched_via_spdy), 109 was_fetched_via_spdy(rhs.was_fetched_via_spdy),
108 was_npn_negotiated(rhs.was_npn_negotiated), 110 was_npn_negotiated(rhs.was_npn_negotiated),
109 was_fetched_via_proxy(rhs.was_fetched_via_proxy), 111 was_fetched_via_proxy(rhs.was_fetched_via_proxy),
110 did_use_http_auth(rhs.did_use_http_auth), 112 did_use_http_auth(rhs.did_use_http_auth),
111 socket_address(rhs.socket_address), 113 socket_address(rhs.socket_address),
112 npn_negotiated_protocol(rhs.npn_negotiated_protocol), 114 npn_negotiated_protocol(rhs.npn_negotiated_protocol),
113 connection_info(rhs.connection_info), 115 connection_info(rhs.connection_info),
114 request_time(rhs.request_time), 116 request_time(rhs.request_time),
115 response_time(rhs.response_time), 117 response_time(rhs.response_time),
116 auth_challenge(rhs.auth_challenge), 118 auth_challenge(rhs.auth_challenge),
117 cert_request_info(rhs.cert_request_info), 119 cert_request_info(rhs.cert_request_info),
118 ssl_info(rhs.ssl_info), 120 ssl_info(rhs.ssl_info),
119 headers(rhs.headers), 121 headers(rhs.headers),
120 vary_data(rhs.vary_data), 122 vary_data(rhs.vary_data),
121 metadata(rhs.metadata) { 123 metadata(rhs.metadata) {
122 } 124 }
123 125
124 HttpResponseInfo::~HttpResponseInfo() { 126 HttpResponseInfo::~HttpResponseInfo() {
125 } 127 }
126 128
127 HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) { 129 HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) {
128 was_cached = rhs.was_cached; 130 was_cached = rhs.was_cached;
129 server_data_unavailable = rhs.server_data_unavailable; 131 server_data_unavailable = rhs.server_data_unavailable;
132 network_accessed = rhs.network_accessed;
130 was_fetched_via_spdy = rhs.was_fetched_via_spdy; 133 was_fetched_via_spdy = rhs.was_fetched_via_spdy;
131 was_npn_negotiated = rhs.was_npn_negotiated; 134 was_npn_negotiated = rhs.was_npn_negotiated;
132 was_fetched_via_proxy = rhs.was_fetched_via_proxy; 135 was_fetched_via_proxy = rhs.was_fetched_via_proxy;
133 did_use_http_auth = rhs.did_use_http_auth; 136 did_use_http_auth = rhs.did_use_http_auth;
134 socket_address = rhs.socket_address; 137 socket_address = rhs.socket_address;
135 npn_negotiated_protocol = rhs.npn_negotiated_protocol; 138 npn_negotiated_protocol = rhs.npn_negotiated_protocol;
136 request_time = rhs.request_time; 139 request_time = rhs.request_time;
137 response_time = rhs.response_time; 140 response_time = rhs.response_time;
138 auth_challenge = rhs.auth_challenge; 141 auth_challenge = rhs.auth_challenge;
139 cert_request_info = rhs.cert_request_info; 142 cert_request_info = rhs.cert_request_info;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 pickle->WriteUInt16(socket_address.port()); 321 pickle->WriteUInt16(socket_address.port());
319 322
320 if (was_npn_negotiated) 323 if (was_npn_negotiated)
321 pickle->WriteString(npn_negotiated_protocol); 324 pickle->WriteString(npn_negotiated_protocol);
322 325
323 if (connection_info != CONNECTION_INFO_UNKNOWN) 326 if (connection_info != CONNECTION_INFO_UNKNOWN)
324 pickle->WriteInt(static_cast<int>(connection_info)); 327 pickle->WriteInt(static_cast<int>(connection_info));
325 } 328 }
326 329
327 } // namespace net 330 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_info.h ('k') | net/http/http_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698