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

Side by Side Diff: chromecast/browser/url_request_context_factory.cc

Issue 2258493003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/url_request_context_factory.h" 5 #include "chromecast/browser/url_request_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 DCHECK(set_protocol); 242 DCHECK(set_protocol);
243 } 243 }
244 set_protocol = job_factory->SetProtocolHandler( 244 set_protocol = job_factory->SetProtocolHandler(
245 url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler)); 245 url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
246 DCHECK(set_protocol); 246 DCHECK(set_protocol);
247 247
248 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 248 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
249 switches::kEnableLocalFileAccesses)) { 249 switches::kEnableLocalFileAccesses)) {
250 set_protocol = job_factory->SetProtocolHandler( 250 set_protocol = job_factory->SetProtocolHandler(
251 url::kFileScheme, 251 url::kFileScheme,
252 base::WrapUnique(new net::FileProtocolHandler( 252 base::MakeUnique<net::FileProtocolHandler>(
253 content::BrowserThread::GetBlockingPool() 253 content::BrowserThread::GetBlockingPool()
254 ->GetTaskRunnerWithShutdownBehavior( 254 ->GetTaskRunnerWithShutdownBehavior(
255 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); 255 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
256 DCHECK(set_protocol); 256 DCHECK(set_protocol);
257 } 257 }
258 258
259 // Set up interceptors in the reverse order. 259 // Set up interceptors in the reverse order.
260 std::unique_ptr<net::URLRequestJobFactory> top_job_factory = 260 std::unique_ptr<net::URLRequestJobFactory> top_job_factory =
261 std::move(job_factory); 261 std::move(job_factory);
262 for (content::URLRequestInterceptorScopedVector::reverse_iterator i = 262 for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
263 request_interceptors.rbegin(); 263 request_interceptors.rbegin();
264 i != request_interceptors.rend(); 264 i != request_interceptors.rend();
265 ++i) { 265 ++i) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 void URLRequestContextFactory::InitializeNetworkDelegates() { 401 void URLRequestContextFactory::InitializeNetworkDelegates() {
402 app_network_delegate_->Initialize(false); 402 app_network_delegate_->Initialize(false);
403 LOG(INFO) << "Initialized app network delegate."; 403 LOG(INFO) << "Initialized app network delegate.";
404 system_network_delegate_->Initialize(false); 404 system_network_delegate_->Initialize(false);
405 LOG(INFO) << "Initialized system network delegate."; 405 LOG(INFO) << "Initialized system network delegate.";
406 } 406 }
407 407
408 } // namespace shell 408 } // namespace shell
409 } // namespace chromecast 409 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/test/chromecast_browser_test_helper_default.cc ('k') | chromecast/crash/linux/crash_testing_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698