OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_browser_context.h" | 5 #include "content/shell/browser/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 return download_manager_delegate_.get(); | 134 return download_manager_delegate_.get(); |
135 } | 135 } |
136 | 136 |
137 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 137 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
138 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 138 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
139 } | 139 } |
140 | 140 |
141 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( | 141 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
142 ProtocolHandlerMap* protocol_handlers) { | 142 ProtocolHandlerMap* protocol_handlers, |
| 143 ProtocolHandlerScopedVector protocol_interceptors) { |
143 DCHECK(!url_request_getter_.get()); | 144 DCHECK(!url_request_getter_.get()); |
144 url_request_getter_ = new ShellURLRequestContextGetter( | 145 url_request_getter_ = new ShellURLRequestContextGetter( |
145 ignore_certificate_errors_, | 146 ignore_certificate_errors_, |
146 GetPath(), | 147 GetPath(), |
147 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), | 148 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), |
148 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), | 149 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), |
149 protocol_handlers, | 150 protocol_handlers, |
| 151 protocol_interceptors.Pass(), |
150 net_log_); | 152 net_log_); |
151 resource_context_->set_url_request_context_getter(url_request_getter_.get()); | 153 resource_context_->set_url_request_context_getter(url_request_getter_.get()); |
152 return url_request_getter_.get(); | 154 return url_request_getter_.get(); |
153 } | 155 } |
154 | 156 |
155 net::URLRequestContextGetter* | 157 net::URLRequestContextGetter* |
156 ShellBrowserContext::GetRequestContextForRenderProcess( | 158 ShellBrowserContext::GetRequestContextForRenderProcess( |
157 int renderer_child_id) { | 159 int renderer_child_id) { |
158 return GetRequestContext(); | 160 return GetRequestContext(); |
159 } | 161 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 const GURL& requesting_frame, | 209 const GURL& requesting_frame, |
208 const ProtectedMediaIdentifierPermissionCallback& callback) { | 210 const ProtectedMediaIdentifierPermissionCallback& callback) { |
209 callback.Run(true); | 211 callback.Run(true); |
210 } | 212 } |
211 | 213 |
212 void ShellBrowserContext::CancelProtectedMediaIdentifierPermissionRequests( | 214 void ShellBrowserContext::CancelProtectedMediaIdentifierPermissionRequests( |
213 int group_id) { | 215 int group_id) { |
214 } | 216 } |
215 | 217 |
216 net::URLRequestContextGetter* | 218 net::URLRequestContextGetter* |
217 ShellBrowserContext::CreateRequestContextForStoragePartition( | 219 ShellBrowserContext::CreateRequestContextForStoragePartition( |
218 const base::FilePath& partition_path, | 220 const base::FilePath& partition_path, |
219 bool in_memory, | 221 bool in_memory, |
220 ProtocolHandlerMap* protocol_handlers) { | 222 ProtocolHandlerMap* protocol_handlers, |
| 223 ProtocolHandlerScopedVector protocol_interceptors) { |
221 return NULL; | 224 return NULL; |
222 } | 225 } |
223 | 226 |
224 ResourceContext* ShellBrowserContext::GetResourceContext() { | 227 ResourceContext* ShellBrowserContext::GetResourceContext() { |
225 return resource_context_.get(); | 228 return resource_context_.get(); |
226 } | 229 } |
227 | 230 |
228 GeolocationPermissionContext* | 231 GeolocationPermissionContext* |
229 ShellBrowserContext::GetGeolocationPermissionContext() { | 232 ShellBrowserContext::GetGeolocationPermissionContext() { |
230 return NULL; | 233 return NULL; |
231 } | 234 } |
232 | 235 |
233 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 236 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
234 return NULL; | 237 return NULL; |
235 } | 238 } |
236 | 239 |
237 } // namespace content | 240 } // namespace content |
OLD | NEW |