| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/engine/common/blimp_browser_context.h" | 5 #include "blimp/engine/common/blimp_browser_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/nix/xdg_util.h" | 10 #include "base/nix/xdg_util.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 net::URLRequestContextGetter* | 100 net::URLRequestContextGetter* |
| 101 BlimpBrowserContext::GetSystemRequestContextGetter() { | 101 BlimpBrowserContext::GetSystemRequestContextGetter() { |
| 102 if (!system_context_getter_) { | 102 if (!system_context_getter_) { |
| 103 system_context_getter_ = new BlimpSystemURLRequestContextGetter(); | 103 system_context_getter_ = new BlimpSystemURLRequestContextGetter(); |
| 104 } | 104 } |
| 105 return system_context_getter_.get(); | 105 return system_context_getter_.get(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 net::URLRequestContextGetter* BlimpBrowserContext::GetRequestContext() { | |
| 109 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | |
| 110 } | |
| 111 | |
| 112 net::URLRequestContextGetter* BlimpBrowserContext::GetMediaRequestContext() { | 108 net::URLRequestContextGetter* BlimpBrowserContext::GetMediaRequestContext() { |
| 113 return GetRequestContext(); | 109 return resource_context_->url_request_context_getter().get(); |
| 114 } | 110 } |
| 115 | 111 |
| 116 net::URLRequestContextGetter* | 112 net::URLRequestContextGetter* |
| 117 BlimpBrowserContext::GetMediaRequestContextForRenderProcess( | 113 BlimpBrowserContext::GetMediaRequestContextForRenderProcess( |
| 118 int renderer_child_id) { | 114 int renderer_child_id) { |
| 119 return GetRequestContext(); | 115 return resource_context_->url_request_context_getter().get(); |
| 120 } | 116 } |
| 121 | 117 |
| 122 net::URLRequestContextGetter* | 118 net::URLRequestContextGetter* |
| 123 BlimpBrowserContext::GetMediaRequestContextForStoragePartition( | 119 BlimpBrowserContext::GetMediaRequestContextForStoragePartition( |
| 124 const base::FilePath& partition_path, | 120 const base::FilePath& partition_path, |
| 125 bool in_memory) { | 121 bool in_memory) { |
| 126 return GetRequestContext(); | 122 return resource_context_->url_request_context_getter().get(); |
| 127 } | 123 } |
| 128 | 124 |
| 129 content::ResourceContext* BlimpBrowserContext::GetResourceContext() { | 125 content::ResourceContext* BlimpBrowserContext::GetResourceContext() { |
| 130 return resource_context_.get(); | 126 return resource_context_.get(); |
| 131 } | 127 } |
| 132 | 128 |
| 133 content::BrowserPluginGuestManager* BlimpBrowserContext::GetGuestManager() { | 129 content::BrowserPluginGuestManager* BlimpBrowserContext::GetGuestManager() { |
| 134 return nullptr; | 130 return nullptr; |
| 135 } | 131 } |
| 136 | 132 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 BlimpBrowserContext::CreateRequestContextForStoragePartition( | 173 BlimpBrowserContext::CreateRequestContextForStoragePartition( |
| 178 const base::FilePath& partition_path, | 174 const base::FilePath& partition_path, |
| 179 bool in_memory, | 175 bool in_memory, |
| 180 content::ProtocolHandlerMap* protocol_handlers, | 176 content::ProtocolHandlerMap* protocol_handlers, |
| 181 content::URLRequestInterceptorScopedVector request_interceptors) { | 177 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 182 return nullptr; | 178 return nullptr; |
| 183 } | 179 } |
| 184 | 180 |
| 185 } // namespace engine | 181 } // namespace engine |
| 186 } // namespace blimp | 182 } // namespace blimp |
| OLD | NEW |