| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_cache.h" | 5 #include "net/http/http_cache.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 if (response_info->ssl_info.security_bits != -1) | 1073 if (response_info->ssl_info.security_bits != -1) |
| 1074 flags |= RESPONSE_INFO_HAS_SECURITY_BITS; | 1074 flags |= RESPONSE_INFO_HAS_SECURITY_BITS; |
| 1075 if (response_info->vary_data.is_valid()) | 1075 if (response_info->vary_data.is_valid()) |
| 1076 flags |= RESPONSE_INFO_HAS_VARY_DATA; | 1076 flags |= RESPONSE_INFO_HAS_VARY_DATA; |
| 1077 | 1077 |
| 1078 Pickle pickle; | 1078 Pickle pickle; |
| 1079 pickle.WriteInt(flags); | 1079 pickle.WriteInt(flags); |
| 1080 pickle.WriteInt64(response_info->request_time.ToInternalValue()); | 1080 pickle.WriteInt64(response_info->request_time.ToInternalValue()); |
| 1081 pickle.WriteInt64(response_info->response_time.ToInternalValue()); | 1081 pickle.WriteInt64(response_info->response_time.ToInternalValue()); |
| 1082 | 1082 |
| 1083 response_info->headers->Persist(&pickle, skip_transient_headers); | 1083 net::HttpResponseHeaders::PersistOptions persist_options = |
| 1084 net::HttpResponseHeaders::PERSIST_RAW; |
| 1085 |
| 1086 if (skip_transient_headers) { |
| 1087 persist_options = |
| 1088 net::HttpResponseHeaders::PERSIST_SANS_COOKIES | |
| 1089 net::HttpResponseHeaders::PERSIST_SANS_CHALLENGES | |
| 1090 net::HttpResponseHeaders::PERSIST_SANS_HOP_BY_HOP | |
| 1091 net::HttpResponseHeaders::PERSIST_SANS_NON_CACHEABLE; |
| 1092 } |
| 1093 |
| 1094 response_info->headers->Persist(&pickle, persist_options); |
| 1084 | 1095 |
| 1085 if (response_info->ssl_info.cert) { | 1096 if (response_info->ssl_info.cert) { |
| 1086 response_info->ssl_info.cert->Persist(&pickle); | 1097 response_info->ssl_info.cert->Persist(&pickle); |
| 1087 pickle.WriteInt(response_info->ssl_info.cert_status); | 1098 pickle.WriteInt(response_info->ssl_info.cert_status); |
| 1088 } | 1099 } |
| 1089 if (response_info->ssl_info.security_bits != -1) | 1100 if (response_info->ssl_info.security_bits != -1) |
| 1090 pickle.WriteInt(response_info->ssl_info.security_bits); | 1101 pickle.WriteInt(response_info->ssl_info.security_bits); |
| 1091 | 1102 |
| 1092 if (response_info->vary_data.is_valid()) | 1103 if (response_info->vary_data.is_valid()) |
| 1093 response_info->vary_data.Persist(&pickle); | 1104 response_info->vary_data.Persist(&pickle); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 | 1372 |
| 1362 entry->pending_queue.erase(entry->pending_queue.begin()); | 1373 entry->pending_queue.erase(entry->pending_queue.begin()); |
| 1363 | 1374 |
| 1364 AddTransactionToEntry(entry, next); | 1375 AddTransactionToEntry(entry, next); |
| 1365 } | 1376 } |
| 1366 | 1377 |
| 1367 //----------------------------------------------------------------------------- | 1378 //----------------------------------------------------------------------------- |
| 1368 | 1379 |
| 1369 } // namespace net | 1380 } // namespace net |
| 1370 | 1381 |
| OLD | NEW |