| 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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 BrowserContext::GetDownloadManager(this)); | 110 BrowserContext::GetDownloadManager(this)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 return download_manager_delegate_.get(); | 113 return download_manager_delegate_.get(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 116 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
| 117 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 117 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( | 120 ShellURLRequestContextGetter* |
| 121 ShellBrowserContext::CreateURLRequestContextGetter( |
| 121 ProtocolHandlerMap* protocol_handlers, | 122 ProtocolHandlerMap* protocol_handlers, |
| 122 URLRequestInterceptorScopedVector request_interceptors) { | 123 URLRequestInterceptorScopedVector request_interceptors) { |
| 123 DCHECK(!url_request_getter_.get()); | 124 return new ShellURLRequestContextGetter( |
| 124 url_request_getter_ = new ShellURLRequestContextGetter( | |
| 125 ignore_certificate_errors_, | 125 ignore_certificate_errors_, |
| 126 GetPath(), | 126 GetPath(), |
| 127 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), | 127 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), |
| 128 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), | 128 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), |
| 129 protocol_handlers, | 129 protocol_handlers, |
| 130 request_interceptors.Pass(), | 130 request_interceptors.Pass(), |
| 131 net_log_); | 131 net_log_); |
| 132 } |
| 133 |
| 134 net::URLRequestContextGetter* ShellBrowserContext::CreateRequestContext( |
| 135 ProtocolHandlerMap* protocol_handlers, |
| 136 URLRequestInterceptorScopedVector request_interceptors) { |
| 137 DCHECK(!url_request_getter_.get()); |
| 138 url_request_getter_ = CreateURLRequestContextGetter( |
| 139 protocol_handlers, request_interceptors.Pass()); |
| 132 resource_context_->set_url_request_context_getter(url_request_getter_.get()); | 140 resource_context_->set_url_request_context_getter(url_request_getter_.get()); |
| 133 return url_request_getter_.get(); | 141 return url_request_getter_.get(); |
| 134 } | 142 } |
| 135 | 143 |
| 136 net::URLRequestContextGetter* | 144 net::URLRequestContextGetter* |
| 137 ShellBrowserContext::GetRequestContextForRenderProcess( | 145 ShellBrowserContext::GetRequestContextForRenderProcess( |
| 138 int renderer_child_id) { | 146 int renderer_child_id) { |
| 139 return GetRequestContext(); | 147 return GetRequestContext(); |
| 140 } | 148 } |
| 141 | 149 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 188 |
| 181 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { | 189 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { |
| 182 return NULL; | 190 return NULL; |
| 183 } | 191 } |
| 184 | 192 |
| 185 SSLHostStateDelegate* ShellBrowserContext::GetSSLHostStateDelegate() { | 193 SSLHostStateDelegate* ShellBrowserContext::GetSSLHostStateDelegate() { |
| 186 return NULL; | 194 return NULL; |
| 187 } | 195 } |
| 188 | 196 |
| 189 } // namespace content | 197 } // namespace content |
| OLD | NEW |