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 "headless/lib/browser/headless_browser_context_impl.h" | 5 #include "headless/lib/browser/headless_browser_context_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 content::BackgroundSyncController* | 145 content::BackgroundSyncController* |
146 HeadlessBrowserContextImpl::GetBackgroundSyncController() { | 146 HeadlessBrowserContextImpl::GetBackgroundSyncController() { |
147 return nullptr; | 147 return nullptr; |
148 } | 148 } |
149 | 149 |
150 net::URLRequestContextGetter* HeadlessBrowserContextImpl::CreateRequestContext( | 150 net::URLRequestContextGetter* HeadlessBrowserContextImpl::CreateRequestContext( |
151 content::ProtocolHandlerMap* protocol_handlers, | 151 content::ProtocolHandlerMap* protocol_handlers, |
152 content::URLRequestInterceptorScopedVector request_interceptors) { | 152 content::URLRequestInterceptorScopedVector request_interceptors) { |
153 scoped_refptr<HeadlessURLRequestContextGetter> url_request_context_getter( | 153 scoped_refptr<HeadlessURLRequestContextGetter> url_request_context_getter( |
154 new HeadlessURLRequestContextGetter( | 154 new HeadlessURLRequestContextGetter( |
155 content::BrowserThread::GetMessageLoopProxyForThread( | 155 content::BrowserThread::GetTaskRunnerForThread( |
156 content::BrowserThread::IO), | 156 content::BrowserThread::IO), |
157 content::BrowserThread::GetMessageLoopProxyForThread( | 157 content::BrowserThread::GetTaskRunnerForThread( |
158 content::BrowserThread::FILE), | 158 content::BrowserThread::FILE), |
159 protocol_handlers, std::move(protocol_handlers_), | 159 protocol_handlers, std::move(protocol_handlers_), |
160 std::move(request_interceptors), options())); | 160 std::move(request_interceptors), options())); |
161 resource_context_->set_url_request_context_getter(url_request_context_getter); | 161 resource_context_->set_url_request_context_getter(url_request_context_getter); |
162 return url_request_context_getter.get(); | 162 return url_request_context_getter.get(); |
163 } | 163 } |
164 | 164 |
165 net::URLRequestContextGetter* | 165 net::URLRequestContextGetter* |
166 HeadlessBrowserContextImpl::CreateRequestContextForStoragePartition( | 166 HeadlessBrowserContextImpl::CreateRequestContextForStoragePartition( |
167 const base::FilePath& partition_path, | 167 const base::FilePath& partition_path, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 return *this; | 202 return *this; |
203 } | 203 } |
204 | 204 |
205 std::unique_ptr<HeadlessBrowserContext> | 205 std::unique_ptr<HeadlessBrowserContext> |
206 HeadlessBrowserContext::Builder::Build() { | 206 HeadlessBrowserContext::Builder::Build() { |
207 return base::WrapUnique(new HeadlessBrowserContextImpl( | 207 return base::WrapUnique(new HeadlessBrowserContextImpl( |
208 std::move(protocol_handlers_), browser_->options())); | 208 std::move(protocol_handlers_), browser_->options())); |
209 } | 209 } |
210 | 210 |
211 } // namespace headless | 211 } // namespace headless |
OLD | NEW |