Chromium Code Reviews| Index: tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
| diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
| index f856f5bab6aef08b864a1b7630ecf7b757038566..e31ff2a06a26b866efdcb412ef45fde83bc75f95 100644 |
| --- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
| +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
| @@ -15,7 +15,6 @@ class ChromeProxyMetricException(page_test.MeasurementFailure): |
| CHROME_PROXY_VIA_HEADER = 'Chrome-Compression-Proxy' |
| -CHROME_PROXY_VIA_HEADER_DEPRECATED = '1.1 Chrome Compression Proxy' |
| class ChromeProxyResponse(network_metrics.HTTPResponse): |
| @@ -47,8 +46,7 @@ class ChromeProxyResponse(network_metrics.HTTPResponse): |
| # The Via header is valid if it is the old format or the new format |
|
sclittle
2015/02/06 20:44:38
Update comment - there is no "old format" now
bengr
2015/02/06 20:55:14
Done.
|
| # with 4-character version prefix, for example, |
| # "1.1 Chrome-Compression-Proxy". |
| - return (CHROME_PROXY_VIA_HEADER_DEPRECATED in vias or |
| - any(v[4:] == CHROME_PROXY_VIA_HEADER for v in vias)) |
| + return (any(v[4:] == CHROME_PROXY_VIA_HEADER for v in vias)) |
|
sclittle
2015/02/06 20:44:38
nit: I think you can remove the outermost parenthe
bengr
2015/02/06 20:55:14
Done.
|
| def IsValidByViaHeader(self): |
| return (not self.ShouldHaveChromeProxyViaHeader() or |
| @@ -323,7 +321,7 @@ class ChromeProxyMetric(network_metrics.NetworkMetric): |
| raise ChromeProxyMetricException, ( |
| 'Response for %s should have come through the fallback proxy.\n' |
| 'Response: remote_port=%s status=(%d, %s)\nHeaders:\n %s' % ( |
| - r.url, str(fallback_resp.remote_port), r.status, r.status_text, |
| + r.url, str(resp.remote_port), r.status, r.status_text, |
| r.headers)) |
| else: |
| via_fallback_count += 1 |