Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |