| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 10 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 | 237 |
| 238 void HttpCache::MetadataWriter::OnIOComplete(int result) { | 238 void HttpCache::MetadataWriter::OnIOComplete(int result) { |
| 239 if (!verified_) | 239 if (!verified_) |
| 240 return VerifyResponse(result); | 240 return VerifyResponse(result); |
| 241 SelfDestroy(); | 241 SelfDestroy(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 //----------------------------------------------------------------------------- | 244 //----------------------------------------------------------------------------- |
| 245 | 245 |
| 246 HttpCache::HttpCache(HostResolver* host_resolver, ProxyService* proxy_service, | 246 HttpCache::HttpCache(HostResolver* host_resolver, |
| 247 DnsRRResolver* dnsrr_resolver, |
| 248 ProxyService* proxy_service, |
| 247 SSLConfigService* ssl_config_service, | 249 SSLConfigService* ssl_config_service, |
| 248 HttpAuthHandlerFactory* http_auth_handler_factory, | 250 HttpAuthHandlerFactory* http_auth_handler_factory, |
| 249 HttpNetworkDelegate* network_delegate, | 251 HttpNetworkDelegate* network_delegate, |
| 250 NetLog* net_log, | 252 NetLog* net_log, |
| 251 BackendFactory* backend_factory) | 253 BackendFactory* backend_factory) |
| 252 : backend_factory_(backend_factory), | 254 : backend_factory_(backend_factory), |
| 253 building_backend_(false), | 255 building_backend_(false), |
| 254 mode_(NORMAL), | 256 mode_(NORMAL), |
| 255 network_layer_(HttpNetworkLayer::CreateFactory(host_resolver, | 257 network_layer_(HttpNetworkLayer::CreateFactory(host_resolver, |
| 256 proxy_service, ssl_config_service, http_auth_handler_factory, | 258 dnsrr_resolver, proxy_service, ssl_config_service, |
| 257 network_delegate, net_log)), | 259 http_auth_handler_factory, network_delegate, net_log)), |
| 258 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), | 260 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), |
| 259 enable_range_support_(true) { | 261 enable_range_support_(true) { |
| 260 } | 262 } |
| 261 | 263 |
| 262 HttpCache::HttpCache(HttpNetworkSession* session, | 264 HttpCache::HttpCache(HttpNetworkSession* session, |
| 263 BackendFactory* backend_factory) | 265 BackendFactory* backend_factory) |
| 264 : backend_factory_(backend_factory), | 266 : backend_factory_(backend_factory), |
| 265 building_backend_(false), | 267 building_backend_(false), |
| 266 mode_(NORMAL), | 268 mode_(NORMAL), |
| 267 network_layer_(HttpNetworkLayer::CreateFactory(session)), | 269 network_layer_(HttpNetworkLayer::CreateFactory(session)), |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 building_backend_ = false; | 1054 building_backend_ = false; |
| 1053 DeletePendingOp(pending_op); | 1055 DeletePendingOp(pending_op); |
| 1054 } | 1056 } |
| 1055 | 1057 |
| 1056 // The cache may be gone when we return from the callback. | 1058 // The cache may be gone when we return from the callback. |
| 1057 if (!item->DoCallback(result, backend)) | 1059 if (!item->DoCallback(result, backend)) |
| 1058 item->NotifyTransaction(result, NULL); | 1060 item->NotifyTransaction(result, NULL); |
| 1059 } | 1061 } |
| 1060 | 1062 |
| 1061 } // namespace net | 1063 } // namespace net |
| OLD | NEW |