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_cache.h" | 5 #include "net/http/http_cache.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 286 } |
287 | 287 |
288 private: | 288 private: |
289 HttpCache* const http_cache_; | 289 HttpCache* const http_cache_; |
290 }; | 290 }; |
291 | 291 |
292 //----------------------------------------------------------------------------- | 292 //----------------------------------------------------------------------------- |
293 HttpCache::HttpCache(HttpNetworkSession* session, | 293 HttpCache::HttpCache(HttpNetworkSession* session, |
294 std::unique_ptr<BackendFactory> backend_factory, | 294 std::unique_ptr<BackendFactory> backend_factory, |
295 bool set_up_quic_server_info) | 295 bool set_up_quic_server_info) |
296 : HttpCache(base::WrapUnique(new HttpNetworkLayer(session)), | 296 : HttpCache(base::MakeUnique<HttpNetworkLayer>(session), |
297 std::move(backend_factory), | 297 std::move(backend_factory), |
298 set_up_quic_server_info) {} | 298 set_up_quic_server_info) {} |
299 | 299 |
300 HttpCache::HttpCache(std::unique_ptr<HttpTransactionFactory> network_layer, | 300 HttpCache::HttpCache(std::unique_ptr<HttpTransactionFactory> network_layer, |
301 std::unique_ptr<BackendFactory> backend_factory, | 301 std::unique_ptr<BackendFactory> backend_factory, |
302 bool set_up_quic_server_info) | 302 bool set_up_quic_server_info) |
303 : net_log_(nullptr), | 303 : net_log_(nullptr), |
304 backend_factory_(std::move(backend_factory)), | 304 backend_factory_(std::move(backend_factory)), |
305 building_backend_(false), | 305 building_backend_(false), |
306 bypass_lock_for_test_(false), | 306 bypass_lock_for_test_(false), |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 building_backend_ = false; | 1154 building_backend_ = false; |
1155 DeletePendingOp(pending_op); | 1155 DeletePendingOp(pending_op); |
1156 } | 1156 } |
1157 | 1157 |
1158 // The cache may be gone when we return from the callback. | 1158 // The cache may be gone when we return from the callback. |
1159 if (!item->DoCallback(result, disk_cache_.get())) | 1159 if (!item->DoCallback(result, disk_cache_.get())) |
1160 item->NotifyTransaction(result, NULL); | 1160 item->NotifyTransaction(result, NULL); |
1161 } | 1161 } |
1162 | 1162 |
1163 } // namespace net | 1163 } // namespace net |
OLD | NEW |