| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 404 } |
| 405 | 405 |
| 406 void HttpCache::CloseCurrentConnections() { | 406 void HttpCache::CloseCurrentConnections() { |
| 407 net::HttpNetworkLayer* network = | 407 net::HttpNetworkLayer* network = |
| 408 static_cast<net::HttpNetworkLayer*>(network_layer_.get()); | 408 static_cast<net::HttpNetworkLayer*>(network_layer_.get()); |
| 409 HttpNetworkSession* session = network->GetSession(); | 409 HttpNetworkSession* session = network->GetSession(); |
| 410 if (session) { | 410 if (session) { |
| 411 session->tcp_socket_pool()->CloseIdleSockets(); | 411 session->tcp_socket_pool()->CloseIdleSockets(); |
| 412 if (session->spdy_session_pool()) | 412 if (session->spdy_session_pool()) |
| 413 session->spdy_session_pool()->CloseAllSessions(); | 413 session->spdy_session_pool()->CloseAllSessions(); |
| 414 session->Flush(); | 414 session->ReplaceTCPSocketPool(); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 //----------------------------------------------------------------------------- | 418 //----------------------------------------------------------------------------- |
| 419 | 419 |
| 420 int HttpCache::CreateBackend(disk_cache::Backend** backend, | 420 int HttpCache::CreateBackend(disk_cache::Backend** backend, |
| 421 CompletionCallback* callback) { | 421 CompletionCallback* callback) { |
| 422 if (!backend_factory_.get()) | 422 if (!backend_factory_.get()) |
| 423 return ERR_FAILED; | 423 return ERR_FAILED; |
| 424 | 424 |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 // This could be an external caller or a transaction waiting on Start(). | 1036 // This could be an external caller or a transaction waiting on Start(). |
| 1037 pending_item->DoCallback(result, temp_backend_); | 1037 pending_item->DoCallback(result, temp_backend_); |
| 1038 pending_item->NotifyTransaction(result, NULL); | 1038 pending_item->NotifyTransaction(result, NULL); |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 DeletePendingOp(pending_op); | 1041 DeletePendingOp(pending_op); |
| 1042 building_backend_ = false; | 1042 building_backend_ = false; |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 } // namespace net | 1045 } // namespace net |
| OLD | NEW |