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

Unified Diff: tools/chrome_proxy/common/chrome_proxy_metrics.py

Issue 1151753003: Integration test for Chrome-Proxy: pass-through directive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@loFiSnackbar
Patch Set: Created 5 years, 7 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: tools/chrome_proxy/common/chrome_proxy_metrics.py
diff --git a/tools/chrome_proxy/common/chrome_proxy_metrics.py b/tools/chrome_proxy/common/chrome_proxy_metrics.py
index 46c7ed89d80d4bd32977437d73e716b5c2ee5784..bf97e05a3b49a6f2f23c9f83a4d6b5835d052946 100644
--- a/tools/chrome_proxy/common/chrome_proxy_metrics.py
+++ b/tools/chrome_proxy/common/chrome_proxy_metrics.py
@@ -91,3 +91,10 @@ class ChromeProxyResponse(network_metrics.HTTPResponse):
return False
values = [v.strip() for v in chrome_proxy_response_header.split(',')]
return any(v == "q=low" for v in values)
+
+ def HasChromeProxyPassThroughRequest(self):
+ if 'Chrome-Proxy' not in self.response.request_headers:
+ return False
+ chrome_proxy_request_header = self.response.request_headers['Chrome-Proxy']
sclittle 2015/05/21 01:54:24 This code to extract a value from a header seems t
megjablon 2015/05/21 19:03:07 WDYT?
sclittle 2015/05/21 19:28:56 Looks good, thanks!
+ values = [v.strip() for v in chrome_proxy_request_header.split(',')]
+ return any(v == "pass-through" for v in values)

Powered by Google App Engine
This is Rietveld 408576698