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

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: 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 =
259 job_factory.PassAs<net::URLRequestJobFactory>(); 259 job_factory.Pass();
gunsch 2014/10/17 20:00:56 nit: could be one line now
dcheng 2014/10/17 20:10:24 Done.
260 for (content::URLRequestInterceptorScopedVector::reverse_iterator i = 260 for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
261 request_interceptors.rbegin(); 261 request_interceptors.rbegin();
262 i != request_interceptors.rend(); 262 i != request_interceptors.rend();
263 ++i) { 263 ++i) {
264 top_job_factory.reset(new net::URLRequestInterceptingJobFactory( 264 top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
265 top_job_factory.Pass(), make_scoped_ptr(*i))); 265 top_job_factory.Pass(), make_scoped_ptr(*i)));
266 } 266 }
267 request_interceptors.weak_clear(); 267 request_interceptors.weak_clear();
268 268
269 main_job_factory_.reset(top_job_factory.release()); 269 main_job_factory_.reset(top_job_factory.release());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 void URLRequestContextFactory::InitializeNetworkDelegates() { 407 void URLRequestContextFactory::InitializeNetworkDelegates() {
408 app_network_delegate_->Initialize(false); 408 app_network_delegate_->Initialize(false);
409 LOG(INFO) << "Initialized app network delegate."; 409 LOG(INFO) << "Initialized app network delegate.";
410 system_network_delegate_->Initialize(false); 410 system_network_delegate_->Initialize(false);
411 LOG(INFO) << "Initialized system network delegate."; 411 LOG(INFO) << "Initialized system network delegate.";
412 } 412 }
413 413
414 } // namespace shell 414 } // namespace shell
415 } // namespace chromecast 415 } // 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