| Index: chrome/browser/net/spdyproxy/data_saving_metrics.cc
|
| diff --git a/chrome/browser/net/spdyproxy/data_saving_metrics.cc b/chrome/browser/net/spdyproxy/data_saving_metrics.cc
|
| index ffce30fd9a4f5d026324be1c767d51e8105e4c52..19c2725f1914ff0ce98cb8c25fa0798d88e64e40 100644
|
| --- a/chrome/browser/net/spdyproxy/data_saving_metrics.cc
|
| +++ b/chrome/browser/net/spdyproxy/data_saving_metrics.cc
|
| @@ -348,28 +348,6 @@ bool IsBypassRequest(const net::URLRequest* request, int64* delay_seconds) {
|
| #endif // defined(OS_ANDROID) || defined(OS_IOS)
|
| }
|
|
|
| -// IsDataReductionProxyReponse returns true if response_headers contains the
|
| -// data reduction proxy Via header value.
|
| -bool IsDataReductionProxyReponse(
|
| - const net::HttpResponseHeaders* response_headers) {
|
| - const char kDatReductionProxyViaValue[] = "1.1 Chrome Compression Proxy";
|
| - size_t value_len = strlen(kDatReductionProxyViaValue);
|
| - void* iter = NULL;
|
| - std::string temp;
|
| - while (response_headers->EnumerateHeader(&iter, "Via", &temp)) {
|
| - string::const_iterator it =
|
| - std::search(temp.begin(),
|
| - temp.end(),
|
| - kDatReductionProxyViaValue,
|
| - kDatReductionProxyViaValue + value_len,
|
| - base::CaseInsensitiveCompareASCII<char>());
|
| - if (it != temp.end()) {
|
| - return true;
|
| - }
|
| - }
|
| - return false;
|
| -}
|
| -
|
| } // namespace
|
|
|
| namespace spdyproxy {
|
| @@ -387,8 +365,11 @@ DataReductionRequestType GetDataReductionRequestType(
|
| return (bypass_delay > kLongBypassDelayInSeconds) ?
|
| LONG_BYPASS : SHORT_BYPASS;
|
| }
|
| - return IsDataReductionProxyReponse(request->response_info().headers) ?
|
| - VIA_DATA_REDUCTION_PROXY: UNKNOWN_TYPE;
|
| + if (DataReductionProxySettings::WasFetchedViaProxy(
|
| + request->response_info().headers)) {
|
| + return VIA_DATA_REDUCTION_PROXY;
|
| + }
|
| + return UNKNOWN_TYPE;
|
| }
|
|
|
| int64 GetAdjustedOriginalContentLength(
|
|
|