| 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/threading/worker_pool.h" | 10 #include "base/threading/worker_pool.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 content::BrowserContext* browser_context, | 352 content::BrowserContext* browser_context, |
| 353 content::ProtocolHandlerMap* protocol_handlers, | 353 content::ProtocolHandlerMap* protocol_handlers, |
| 354 content::URLRequestInterceptorScopedVector request_interceptors) { | 354 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 355 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 355 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
| 356 InitializeSystemContextDependencies(); | 356 InitializeSystemContextDependencies(); |
| 357 | 357 |
| 358 net::HttpCache::BackendFactory* main_backend = | 358 net::HttpCache::BackendFactory* main_backend = |
| 359 net::HttpCache::DefaultBackend::InMemory(16 * 1024 * 1024); | 359 net::HttpCache::DefaultBackend::InMemory(16 * 1024 * 1024); |
| 360 | 360 |
| 361 bool ignore_certificate_errors = false; | 361 bool ignore_certificate_errors = false; |
| 362 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 362 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 363 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors)) { | 363 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors)) { |
| 364 ignore_certificate_errors = true; | 364 ignore_certificate_errors = true; |
| 365 } | 365 } |
| 366 net::HttpNetworkSession::Params network_session_params; | 366 net::HttpNetworkSession::Params network_session_params; |
| 367 PopulateNetworkSessionParams(ignore_certificate_errors, | 367 PopulateNetworkSessionParams(ignore_certificate_errors, |
| 368 &network_session_params); | 368 &network_session_params); |
| 369 InitializeMainContextDependencies( | 369 InitializeMainContextDependencies( |
| 370 new net::HttpCache(network_session_params, main_backend), | 370 new net::HttpCache(network_session_params, main_backend), |
| 371 protocol_handlers, | 371 protocol_handlers, |
| 372 request_interceptors.Pass()); | 372 request_interceptors.Pass()); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 404 |
| 405 void URLRequestContextFactory::InitializeNetworkDelegates() { | 405 void URLRequestContextFactory::InitializeNetworkDelegates() { |
| 406 app_network_delegate_->Initialize(false); | 406 app_network_delegate_->Initialize(false); |
| 407 LOG(INFO) << "Initialized app network delegate."; | 407 LOG(INFO) << "Initialized app network delegate."; |
| 408 system_network_delegate_->Initialize(false); | 408 system_network_delegate_->Initialize(false); |
| 409 LOG(INFO) << "Initialized system network delegate."; | 409 LOG(INFO) << "Initialized system network delegate."; |
| 410 } | 410 } |
| 411 | 411 |
| 412 } // namespace shell | 412 } // namespace shell |
| 413 } // namespace chromecast | 413 } // namespace chromecast |
| OLD | NEW |