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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 | 216 |
217 void HttpCache::MetadataWriter::OnIOComplete(int result) { | 217 void HttpCache::MetadataWriter::OnIOComplete(int result) { |
218 if (!verified_) | 218 if (!verified_) |
219 return VerifyResponse(result); | 219 return VerifyResponse(result); |
220 SelfDestroy(); | 220 SelfDestroy(); |
221 } | 221 } |
222 | 222 |
223 //----------------------------------------------------------------------------- | 223 //----------------------------------------------------------------------------- |
224 | 224 |
225 HttpCache::HttpCache(NetworkChangeNotifier* network_change_notifier, | 225 HttpCache::HttpCache(HostResolver* host_resolver, ProxyService* proxy_service, |
226 HostResolver* host_resolver, ProxyService* proxy_service, | |
227 SSLConfigService* ssl_config_service, | 226 SSLConfigService* ssl_config_service, |
228 HttpAuthHandlerFactory* http_auth_handler_factory, | 227 HttpAuthHandlerFactory* http_auth_handler_factory, |
229 HttpNetworkDelegate* network_delegate, | 228 HttpNetworkDelegate* network_delegate, |
230 NetLog* net_log, | 229 NetLog* net_log, |
231 BackendFactory* backend_factory) | 230 BackendFactory* backend_factory) |
232 : backend_factory_(backend_factory), | 231 : backend_factory_(backend_factory), |
233 temp_backend_(NULL), | 232 temp_backend_(NULL), |
234 building_backend_(false), | 233 building_backend_(false), |
235 mode_(NORMAL), | 234 mode_(NORMAL), |
236 network_layer_(HttpNetworkLayer::CreateFactory( | 235 network_layer_(HttpNetworkLayer::CreateFactory(host_resolver, |
237 network_change_notifier, host_resolver, proxy_service, | 236 proxy_service, ssl_config_service, http_auth_handler_factory, |
238 ssl_config_service, http_auth_handler_factory, | 237 network_delegate, net_log)), |
239 network_delegate, | |
240 net_log)), | |
241 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), | 238 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), |
242 enable_range_support_(true) { | 239 enable_range_support_(true) { |
243 } | 240 } |
244 | 241 |
245 HttpCache::HttpCache(HttpNetworkSession* session, | 242 HttpCache::HttpCache(HttpNetworkSession* session, |
246 BackendFactory* backend_factory) | 243 BackendFactory* backend_factory) |
247 : backend_factory_(backend_factory), | 244 : backend_factory_(backend_factory), |
248 temp_backend_(NULL), | 245 temp_backend_(NULL), |
249 building_backend_(false), | 246 building_backend_(false), |
250 mode_(NORMAL), | 247 mode_(NORMAL), |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 // This could be an external caller or a transaction waiting on Start(). | 987 // This could be an external caller or a transaction waiting on Start(). |
991 pending_item->DoCallback(result, temp_backend_); | 988 pending_item->DoCallback(result, temp_backend_); |
992 pending_item->NotifyTransaction(result, NULL); | 989 pending_item->NotifyTransaction(result, NULL); |
993 } | 990 } |
994 | 991 |
995 DeletePendingOp(pending_op); | 992 DeletePendingOp(pending_op); |
996 building_backend_ = false; | 993 building_backend_ = false; |
997 } | 994 } |
998 | 995 |
999 } // namespace net | 996 } // namespace net |
OLD | NEW |