Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Side by Side Diff: headless/lib/browser/headless_browser_context.cc

Issue 1862203005: Remove ContentBrowserClient::CreateRequestContext & CreateRequestContextForStoragePartition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.h" 5 #include "headless/lib/browser/headless_browser_context.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 content::PermissionManager* HeadlessBrowserContext::GetPermissionManager() { 146 content::PermissionManager* HeadlessBrowserContext::GetPermissionManager() {
147 return nullptr; 147 return nullptr;
148 } 148 }
149 149
150 content::BackgroundSyncController* 150 content::BackgroundSyncController*
151 HeadlessBrowserContext::GetBackgroundSyncController() { 151 HeadlessBrowserContext::GetBackgroundSyncController() {
152 return nullptr; 152 return nullptr;
153 } 153 }
154 154
155 net::URLRequestContextGetter* HeadlessBrowserContext::CreateRequestContext(
156 content::ProtocolHandlerMap* protocol_handlers,
157 content::URLRequestInterceptorScopedVector request_interceptors) {
158 scoped_refptr<HeadlessURLRequestContextGetter> url_request_context_getter(
159 new HeadlessURLRequestContextGetter(
160 false /* ignore_certificate_errors */, GetPath(),
161 content::BrowserThread::GetMessageLoopProxyForThread(
162 content::BrowserThread::IO),
163 content::BrowserThread::GetMessageLoopProxyForThread(
164 content::BrowserThread::FILE),
165 protocol_handlers, std::move(request_interceptors),
166 nullptr /* net_log */, options()));
167 resource_context_->set_url_request_context_getter(url_request_context_getter);
168 return url_request_context_getter.get();
169 }
170
171 net::URLRequestContextGetter*
172 HeadlessBrowserContext::CreateRequestContextForStoragePartition(
173 const base::FilePath& partition_path,
174 bool in_memory,
175 content::ProtocolHandlerMap* protocol_handlers,
176 content::URLRequestInterceptorScopedVector request_interceptors) {
177 return nullptr;
178 }
179
155 void HeadlessBrowserContext::SetOptionsForTesting( 180 void HeadlessBrowserContext::SetOptionsForTesting(
156 const HeadlessBrowser::Options& options) { 181 const HeadlessBrowser::Options& options) {
157 options_ = options; 182 options_ = options;
158 } 183 }
159 184
160 void HeadlessBrowserContext::SetURLRequestContextGetter(
161 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) {
162 resource_context_->set_url_request_context_getter(url_request_context_getter);
163 }
164
165 } // namespace headless 185 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698