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

Unified Diff: headless/lib/browser/headless_url_request_context_getter.cc

Issue 1781193004: headless: Make it possible to configure an HTTP proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finalized test. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/headless_url_request_context_getter.cc
diff --git a/headless/lib/browser/headless_url_request_context_getter.cc b/headless/lib/browser/headless_url_request_context_getter.cc
index de1ad37fcd29dd2d762c1103973b410d70c1adfa..8af00a578adb7d047b186fa2db28dad2ae180366 100644
--- a/headless/lib/browser/headless_url_request_context_getter.cc
+++ b/headless/lib/browser/headless_url_request_context_getter.cc
@@ -85,12 +85,16 @@ HeadlessURLRequestContextGetter::CreateNetworkDelegate() {
scoped_ptr<net::ProxyConfigService>
HeadlessURLRequestContextGetter::GetProxyConfigService() {
+ if (!options_.proxy_server.IsEmpty())
+ return nullptr;
alex clarke (OOO till 29th) 2016/03/14 18:16:08 Is it worth adding a comment to the definition say
Sami 2016/03/14 18:33:27 Good point, it might be cleaner just to avoid call
return net::ProxyService::CreateSystemProxyConfigService(io_task_runner_,
file_task_runner_);
}
scoped_ptr<net::ProxyService>
HeadlessURLRequestContextGetter::GetProxyService() {
+ if (!options_.proxy_server.IsEmpty())
+ return net::ProxyService::CreateFixed(options_.proxy_server.ToString());
return net::ProxyService::CreateUsingSystemProxyResolver(
std::move(proxy_config_service_), 0, url_request_context_->net_log());
}

Powered by Google App Engine
This is Rietveld 408576698