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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py

Issue 23061006: [Telemetry] Bypass proxies in Chrome and on the host machine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py
index 17aaf922686ba8fa55f430b5171ec9ec62f80c50..59cf07355af47001bb9b986ea620e6ce8ef54004 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/chrome_browser_backend.py
@@ -77,6 +77,7 @@ class ChromeBrowserBackend(browser_backend.BrowserBackend):
args.append('--disable-background-networking')
args.append('--metrics-recording-only')
args.append('--no-first-run')
+ args.append('--no-proxy-server')
if self.options.wpr_mode != wpr_modes.WPR_OFF:
args.extend(wpr_server.GetChromeFlags(
self.WEBPAGEREPLAY_HOST,
@@ -169,7 +170,9 @@ class ChromeBrowserBackend(browser_backend.BrowserBackend):
if path:
url += '/' + path
try:
- req = urllib2.urlopen(url, timeout=timeout)
+ proxy_handler = urllib2.ProxyHandler({}) # Bypass any system proxy.
+ opener = urllib2.build_opener(proxy_handler)
+ req = opener.open(url, timeout=timeout)
return req.read()
except (socket.error, httplib.BadStatusLine, urllib2.URLError) as e:
if throw_network_exception:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698