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

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

Issue 665663002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Format Created 6 years, 2 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 | « no previous file | components/policy/core/common/registry_dict_win.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 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 set_protocol = job_factory->SetProtocolHandler( 248 set_protocol = job_factory->SetProtocolHandler(
249 url::kFileScheme, 249 url::kFileScheme,
250 new net::FileProtocolHandler( 250 new net::FileProtocolHandler(
251 content::BrowserThread::GetBlockingPool()-> 251 content::BrowserThread::GetBlockingPool()->
252 GetTaskRunnerWithShutdownBehavior( 252 GetTaskRunnerWithShutdownBehavior(
253 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); 253 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
254 DCHECK(set_protocol); 254 DCHECK(set_protocol);
255 #endif // defined(OS_ANDROID) 255 #endif // defined(OS_ANDROID)
256 256
257 // Set up interceptors in the reverse order. 257 // Set up interceptors in the reverse order.
258 scoped_ptr<net::URLRequestJobFactory> top_job_factory = 258 scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();
259 job_factory.PassAs<net::URLRequestJobFactory>();
260 for (content::URLRequestInterceptorScopedVector::reverse_iterator i = 259 for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
261 request_interceptors.rbegin(); 260 request_interceptors.rbegin();
262 i != request_interceptors.rend(); 261 i != request_interceptors.rend();
263 ++i) { 262 ++i) {
264 top_job_factory.reset(new net::URLRequestInterceptingJobFactory( 263 top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
265 top_job_factory.Pass(), make_scoped_ptr(*i))); 264 top_job_factory.Pass(), make_scoped_ptr(*i)));
266 } 265 }
267 request_interceptors.weak_clear(); 266 request_interceptors.weak_clear();
268 267
269 main_job_factory_.reset(top_job_factory.release()); 268 main_job_factory_.reset(top_job_factory.release());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 405
407 void URLRequestContextFactory::InitializeNetworkDelegates() { 406 void URLRequestContextFactory::InitializeNetworkDelegates() {
408 app_network_delegate_->Initialize(false); 407 app_network_delegate_->Initialize(false);
409 LOG(INFO) << "Initialized app network delegate."; 408 LOG(INFO) << "Initialized app network delegate.";
410 system_network_delegate_->Initialize(false); 409 system_network_delegate_->Initialize(false);
411 LOG(INFO) << "Initialized system network delegate."; 410 LOG(INFO) << "Initialized system network delegate.";
412 } 411 }
413 412
414 } // namespace shell 413 } // namespace shell
415 } // namespace chromecast 414 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/registry_dict_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698