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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2256173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace a WrapUnique() nested inside a MakeUnique() 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
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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 } 2454 }
2455 } 2455 }
2456 2456
2457 void ResourceDispatcherHostImpl::BlockRequestsForRoute( 2457 void ResourceDispatcherHostImpl::BlockRequestsForRoute(
2458 const GlobalFrameRoutingId& global_routing_id) { 2458 const GlobalFrameRoutingId& global_routing_id) {
2459 DCHECK_CURRENTLY_ON(BrowserThread::IO); 2459 DCHECK_CURRENTLY_ON(BrowserThread::IO);
2460 DCHECK(blocked_loaders_map_.find(global_routing_id) == 2460 DCHECK(blocked_loaders_map_.find(global_routing_id) ==
2461 blocked_loaders_map_.end()) 2461 blocked_loaders_map_.end())
2462 << "BlockRequestsForRoute called multiple time for the same RFH"; 2462 << "BlockRequestsForRoute called multiple time for the same RFH";
2463 blocked_loaders_map_[global_routing_id] = 2463 blocked_loaders_map_[global_routing_id] =
2464 base::WrapUnique(new BlockedLoadersList()); 2464 base::MakeUnique<BlockedLoadersList>();
2465 } 2465 }
2466 2466
2467 void ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute( 2467 void ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute(
2468 const GlobalFrameRoutingId& global_routing_id) { 2468 const GlobalFrameRoutingId& global_routing_id) {
2469 ProcessBlockedRequestsForRoute(global_routing_id, false); 2469 ProcessBlockedRequestsForRoute(global_routing_id, false);
2470 } 2470 }
2471 2471
2472 void ResourceDispatcherHostImpl::CancelBlockedRequestsForRoute( 2472 void ResourceDispatcherHostImpl::CancelBlockedRequestsForRoute(
2473 const GlobalFrameRoutingId& global_routing_id) { 2473 const GlobalFrameRoutingId& global_routing_id) {
2474 ProcessBlockedRequestsForRoute(global_routing_id, true); 2474 ProcessBlockedRequestsForRoute(global_routing_id, true);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 request_info->GetRouteID(), is_content_initiated, true, &throttles); 2705 request_info->GetRouteID(), is_content_initiated, true, &throttles);
2706 if (!throttles.empty()) { 2706 if (!throttles.empty()) {
2707 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2707 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2708 std::move(throttles))); 2708 std::move(throttles)));
2709 } 2709 }
2710 } 2710 }
2711 return handler; 2711 return handler;
2712 } 2712 }
2713 2713
2714 } // namespace content 2714 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/browser/loader/upload_data_stream_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698