Chromium Code Reviews| 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) |