| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 return download_manager_delegate_.get(); | 126 return download_manager_delegate_.get(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 ShellURLRequestContextGetter* | 129 ShellURLRequestContextGetter* |
| 130 ShellBrowserContext::CreateURLRequestContextGetter( | 130 ShellBrowserContext::CreateURLRequestContextGetter( |
| 131 ProtocolHandlerMap* protocol_handlers, | 131 ProtocolHandlerMap* protocol_handlers, |
| 132 URLRequestInterceptorScopedVector request_interceptors) { | 132 URLRequestInterceptorScopedVector request_interceptors) { |
| 133 return new ShellURLRequestContextGetter( | 133 return new ShellURLRequestContextGetter( |
| 134 ignore_certificate_errors_, GetPath(), | 134 ignore_certificate_errors_, GetPath(), |
| 135 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 135 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
| 136 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 136 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
| 137 protocol_handlers, std::move(request_interceptors), net_log_); | 137 protocol_handlers, std::move(request_interceptors), net_log_); |
| 138 } | 138 } |
| 139 | 139 |
| 140 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( | 140 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
| 141 ProtocolHandlerMap* protocol_handlers, | 141 ProtocolHandlerMap* protocol_handlers, |
| 142 URLRequestInterceptorScopedVector request_interceptors) { | 142 URLRequestInterceptorScopedVector request_interceptors) { |
| 143 DCHECK(!url_request_getter_.get()); | 143 DCHECK(!url_request_getter_.get()); |
| 144 url_request_getter_ = CreateURLRequestContextGetter( | 144 url_request_getter_ = CreateURLRequestContextGetter( |
| 145 protocol_handlers, std::move(request_interceptors)); | 145 protocol_handlers, std::move(request_interceptors)); |
| 146 resource_context_->set_url_request_context_getter(url_request_getter_.get()); | 146 resource_context_->set_url_request_context_getter(url_request_getter_.get()); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 return permission_manager_.get(); | 195 return permission_manager_.get(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { | 198 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { |
| 199 if (!background_sync_controller_) | 199 if (!background_sync_controller_) |
| 200 background_sync_controller_.reset(new MockBackgroundSyncController()); | 200 background_sync_controller_.reset(new MockBackgroundSyncController()); |
| 201 return background_sync_controller_.get(); | 201 return background_sync_controller_.get(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace content | 204 } // namespace content |
| OLD | NEW |