| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 : is_media_(is_media), | 57 : is_media_(is_media), |
| 58 factory_(factory) { | 58 factory_(factory) { |
| 59 } | 59 } |
| 60 | 60 |
| 61 net::URLRequestContext* GetURLRequestContext() override { | 61 net::URLRequestContext* GetURLRequestContext() override { |
| 62 if (!request_context_) { | 62 if (!request_context_) { |
| 63 if (is_media_) { | 63 if (is_media_) { |
| 64 request_context_.reset(factory_->CreateMediaRequestContext()); | 64 request_context_.reset(factory_->CreateMediaRequestContext()); |
| 65 } else { | 65 } else { |
| 66 request_context_.reset(factory_->CreateSystemRequestContext()); | 66 request_context_.reset(factory_->CreateSystemRequestContext()); |
| 67 #if defined(USE_NSS) | 67 #if defined(USE_NSS_CERTS) |
| 68 // Set request context used by NSS for Crl requests. | 68 // Set request context used by NSS for Crl requests. |
| 69 net::SetURLRequestContextForNSSHttpIO(request_context_.get()); | 69 net::SetURLRequestContextForNSSHttpIO(request_context_.get()); |
| 70 #endif // defined(USE_NSS) | 70 #endif // defined(USE_NSS_CERTS) |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 return request_context_.get(); | 73 return request_context_.get(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 scoped_refptr<base::SingleThreadTaskRunner> | 76 scoped_refptr<base::SingleThreadTaskRunner> |
| 77 GetNetworkTaskRunner() const override { | 77 GetNetworkTaskRunner() const override { |
| 78 return content::BrowserThread::GetMessageLoopProxyForThread( | 78 return content::BrowserThread::GetMessageLoopProxyForThread( |
| 79 content::BrowserThread::IO); | 79 content::BrowserThread::IO); |
| 80 } | 80 } |
| (...skipping 323 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 |