| OLD | NEW |
| 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/time.h" | 9 #include "base/time/time.h" |
| 10 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // This bit is set if ssl_info recorded that PKP was bypassed due to a local | 99 // This bit is set if ssl_info recorded that PKP was bypassed due to a local |
| 100 // trust anchor. | 100 // trust anchor. |
| 101 RESPONSE_INFO_PKP_BYPASSED = 1 << 23, | 101 RESPONSE_INFO_PKP_BYPASSED = 1 << 23, |
| 102 | 102 |
| 103 // TODO(darin): Add other bits to indicate alternate request methods. | 103 // TODO(darin): Add other bits to indicate alternate request methods. |
| 104 // For now, we don't support storing those. | 104 // For now, we don't support storing those. |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 HttpResponseInfo::HttpResponseInfo() | 107 HttpResponseInfo::HttpResponseInfo() |
| 108 : was_cached(false), | 108 : was_cached(false), |
| 109 cache_entry_status(CacheEntryStatus::ENTRY_UNDEFINED), |
| 109 server_data_unavailable(false), | 110 server_data_unavailable(false), |
| 110 network_accessed(false), | 111 network_accessed(false), |
| 111 was_fetched_via_spdy(false), | 112 was_fetched_via_spdy(false), |
| 112 was_npn_negotiated(false), | 113 was_npn_negotiated(false), |
| 113 was_fetched_via_proxy(false), | 114 was_fetched_via_proxy(false), |
| 114 did_use_http_auth(false), | 115 did_use_http_auth(false), |
| 115 unused_since_prefetch(false), | 116 unused_since_prefetch(false), |
| 116 async_revalidation_required(false), | 117 async_revalidation_required(false), |
| 117 connection_info(CONNECTION_INFO_UNKNOWN) {} | 118 connection_info(CONNECTION_INFO_UNKNOWN) {} |
| 118 | 119 |
| 119 HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs) | 120 HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs) |
| 120 : was_cached(rhs.was_cached), | 121 : was_cached(rhs.was_cached), |
| 122 cache_entry_status(rhs.cache_entry_status), |
| 121 server_data_unavailable(rhs.server_data_unavailable), | 123 server_data_unavailable(rhs.server_data_unavailable), |
| 122 network_accessed(rhs.network_accessed), | 124 network_accessed(rhs.network_accessed), |
| 123 was_fetched_via_spdy(rhs.was_fetched_via_spdy), | 125 was_fetched_via_spdy(rhs.was_fetched_via_spdy), |
| 124 was_npn_negotiated(rhs.was_npn_negotiated), | 126 was_npn_negotiated(rhs.was_npn_negotiated), |
| 125 was_fetched_via_proxy(rhs.was_fetched_via_proxy), | 127 was_fetched_via_proxy(rhs.was_fetched_via_proxy), |
| 126 proxy_server(rhs.proxy_server), | 128 proxy_server(rhs.proxy_server), |
| 127 did_use_http_auth(rhs.did_use_http_auth), | 129 did_use_http_auth(rhs.did_use_http_auth), |
| 128 unused_since_prefetch(rhs.unused_since_prefetch), | 130 unused_since_prefetch(rhs.unused_since_prefetch), |
| 129 async_revalidation_required(rhs.async_revalidation_required), | 131 async_revalidation_required(rhs.async_revalidation_required), |
| 130 socket_address(rhs.socket_address), | 132 socket_address(rhs.socket_address), |
| 131 npn_negotiated_protocol(rhs.npn_negotiated_protocol), | 133 npn_negotiated_protocol(rhs.npn_negotiated_protocol), |
| 132 connection_info(rhs.connection_info), | 134 connection_info(rhs.connection_info), |
| 133 request_time(rhs.request_time), | 135 request_time(rhs.request_time), |
| 134 response_time(rhs.response_time), | 136 response_time(rhs.response_time), |
| 135 auth_challenge(rhs.auth_challenge), | 137 auth_challenge(rhs.auth_challenge), |
| 136 cert_request_info(rhs.cert_request_info), | 138 cert_request_info(rhs.cert_request_info), |
| 137 ssl_info(rhs.ssl_info), | 139 ssl_info(rhs.ssl_info), |
| 138 headers(rhs.headers), | 140 headers(rhs.headers), |
| 139 vary_data(rhs.vary_data), | 141 vary_data(rhs.vary_data), |
| 140 metadata(rhs.metadata) {} | 142 metadata(rhs.metadata) {} |
| 141 | 143 |
| 142 HttpResponseInfo::~HttpResponseInfo() { | 144 HttpResponseInfo::~HttpResponseInfo() { |
| 143 } | 145 } |
| 144 | 146 |
| 145 HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) { | 147 HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) { |
| 146 was_cached = rhs.was_cached; | 148 was_cached = rhs.was_cached; |
| 149 cache_entry_status = rhs.cache_entry_status; |
| 147 server_data_unavailable = rhs.server_data_unavailable; | 150 server_data_unavailable = rhs.server_data_unavailable; |
| 148 network_accessed = rhs.network_accessed; | 151 network_accessed = rhs.network_accessed; |
| 149 was_fetched_via_spdy = rhs.was_fetched_via_spdy; | 152 was_fetched_via_spdy = rhs.was_fetched_via_spdy; |
| 150 proxy_server = rhs.proxy_server; | 153 proxy_server = rhs.proxy_server; |
| 151 was_npn_negotiated = rhs.was_npn_negotiated; | 154 was_npn_negotiated = rhs.was_npn_negotiated; |
| 152 was_fetched_via_proxy = rhs.was_fetched_via_proxy; | 155 was_fetched_via_proxy = rhs.was_fetched_via_proxy; |
| 153 did_use_http_auth = rhs.did_use_http_auth; | 156 did_use_http_auth = rhs.did_use_http_auth; |
| 154 unused_since_prefetch = rhs.unused_since_prefetch; | 157 unused_since_prefetch = rhs.unused_since_prefetch; |
| 155 async_revalidation_required = rhs.async_revalidation_required; | 158 async_revalidation_required = rhs.async_revalidation_required; |
| 156 socket_address = rhs.socket_address; | 159 socket_address = rhs.socket_address; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 case CONNECTION_INFO_HTTP1_0: | 444 case CONNECTION_INFO_HTTP1_0: |
| 442 return "http/1.0"; | 445 return "http/1.0"; |
| 443 case NUM_OF_CONNECTION_INFOS: | 446 case NUM_OF_CONNECTION_INFOS: |
| 444 break; | 447 break; |
| 445 } | 448 } |
| 446 NOTREACHED(); | 449 NOTREACHED(); |
| 447 return ""; | 450 return ""; |
| 448 } | 451 } |
| 449 | 452 |
| 450 } // namespace net | 453 } // namespace net |
| OLD | NEW |