| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 126 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
| 127 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 127 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 ShellURLRequestContextGetter* | 130 ShellURLRequestContextGetter* |
| 131 ShellBrowserContext::CreateURLRequestContextGetter( | 131 ShellBrowserContext::CreateURLRequestContextGetter( |
| 132 ProtocolHandlerMap* protocol_handlers, | 132 ProtocolHandlerMap* protocol_handlers, |
| 133 URLRequestInterceptorScopedVector request_interceptors) { | 133 URLRequestInterceptorScopedVector request_interceptors) { |
| 134 return new ShellURLRequestContextGetter( | 134 return new ShellURLRequestContextGetter( |
| 135 ignore_certificate_errors_, GetPath(), | 135 ignore_certificate_errors_, GetPath(), |
| 136 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), | 136 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
| 137 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), | 137 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 138 protocol_handlers, std::move(request_interceptors), net_log_); | 138 protocol_handlers, std::move(request_interceptors), net_log_); |
| 139 } | 139 } |
| 140 | 140 |
| 141 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( | 141 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
| 142 ProtocolHandlerMap* protocol_handlers, | 142 ProtocolHandlerMap* protocol_handlers, |
| 143 URLRequestInterceptorScopedVector request_interceptors) { | 143 URLRequestInterceptorScopedVector request_interceptors) { |
| 144 DCHECK(!url_request_getter_.get()); | 144 DCHECK(!url_request_getter_.get()); |
| 145 url_request_getter_ = CreateURLRequestContextGetter( | 145 url_request_getter_ = CreateURLRequestContextGetter( |
| 146 protocol_handlers, std::move(request_interceptors)); | 146 protocol_handlers, std::move(request_interceptors)); |
| 147 resource_context_->set_url_request_context_getter(url_request_getter_.get()); | 147 resource_context_->set_url_request_context_getter(url_request_getter_.get()); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return permission_manager_.get(); | 207 return permission_manager_.get(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { | 210 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { |
| 211 if (!background_sync_controller_) | 211 if (!background_sync_controller_) |
| 212 background_sync_controller_.reset(new MockBackgroundSyncController()); | 212 background_sync_controller_.reset(new MockBackgroundSyncController()); |
| 213 return background_sync_controller_.get(); | 213 return background_sync_controller_.get(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace content | 216 } // namespace content |
| OLD | NEW |