| 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/cast_browser_context.h" | 5 #include "chromecast/browser/cast_browser_context.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "chromecast/browser/cast_download_manager_delegate.h" | 11 #include "chromecast/browser/cast_download_manager_delegate.h" |
| 12 #include "chromecast/browser/url_request_context_factory.h" | 12 #include "chromecast/browser/url_request_context_factory.h" |
| 13 #include "chromecast/common/cast_paths.h" | 13 #include "chromecast/common/cast_paths.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/resource_context.h" | 15 #include "content/public/browser/resource_context.h" |
| 16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
| 17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
| 18 #include "net/url_request/url_request_context.h" | 18 #include "net/url_request/url_request_context.h" |
| 19 #include "net/url_request/url_request_context_getter.h" | 19 #include "net/url_request/url_request_context_getter.h" |
| 20 | 20 |
| 21 namespace chromecast { | 21 namespace chromecast { |
| 22 namespace shell { | 22 namespace shell { |
| 23 | 23 |
| 24 class CastBrowserContext::CastResourceContext : | 24 class CastBrowserContext::CastResourceContext : |
| 25 public content::ResourceContext { | 25 public content::ResourceContext { |
| 26 public: | 26 public: |
| 27 explicit CastResourceContext( | 27 explicit CastResourceContext( |
| 28 URLRequestContextFactory* url_request_context_factory) : | 28 URLRequestContextFactory* url_request_context_factory) : |
| 29 url_request_context_factory_(url_request_context_factory) {} | 29 url_request_context_factory_(url_request_context_factory) {} |
| 30 virtual ~CastResourceContext() {} | 30 ~CastResourceContext() override {} |
| 31 | 31 |
| 32 // ResourceContext implementation: | 32 // ResourceContext implementation: |
| 33 virtual net::HostResolver* GetHostResolver() override { | 33 net::HostResolver* GetHostResolver() override { |
| 34 return url_request_context_factory_->GetMainGetter()-> | 34 return url_request_context_factory_->GetMainGetter()-> |
| 35 GetURLRequestContext()->host_resolver(); | 35 GetURLRequestContext()->host_resolver(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 virtual net::URLRequestContext* GetRequestContext() override { | 38 net::URLRequestContext* GetRequestContext() override { |
| 39 return url_request_context_factory_->GetMainGetter()-> | 39 return url_request_context_factory_->GetMainGetter()-> |
| 40 GetURLRequestContext(); | 40 GetURLRequestContext(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 URLRequestContextFactory* url_request_context_factory_; | 44 URLRequestContextFactory* url_request_context_factory_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(CastResourceContext); | 46 DISALLOW_COPY_AND_ASSIGN(CastResourceContext); |
| 47 }; | 47 }; |
| 48 | 48 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return NULL; | 144 return NULL; |
| 145 } | 145 } |
| 146 | 146 |
| 147 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() { | 147 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() { |
| 148 NOTIMPLEMENTED(); | 148 NOTIMPLEMENTED(); |
| 149 return NULL; | 149 return NULL; |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace shell | 152 } // namespace shell |
| 153 } // namespace chromecast | 153 } // namespace chromecast |
| OLD | NEW |