Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: net/http/http_cache.cc

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_auth_handler_negotiate_unittest.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate_unittest.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698