Index: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc |
diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc |
index 773d14c7042f1443b5c757196c84bec974f702cd..e48afc366876e3aed082e133548044b45713a1f2 100644 |
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc |
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc |
@@ -20,6 +20,9 @@ using net::ProxyService; |
namespace data_reduction_proxy { |
+const char* kDataReductionProxyViaValues[] = {"Chrome-Compression-Proxy", |
bengr
2014/07/11 18:22:49
I don't know why you added this here, but make the
bengr
2014/07/11 18:22:49
Also, move this into an anonymous namespace.
|
+ "Chrome Compression Proxy"}; |
+ |
bool GetDataReductionProxyBypassDuration( |
const net::HttpResponseHeaders* headers, |
const std::string& action_prefix, |
@@ -78,8 +81,7 @@ bool GetDataReductionProxyInfo(const net::HttpResponseHeaders* headers, |
bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers) { |
const size_t kVersionSize = 4; |
- const char kDataReductionProxyViaValue[] = "Chrome-Compression-Proxy"; |
- size_t value_len = strlen(kDataReductionProxyViaValue); |
+ size_t value_len = strlen(kDataReductionProxyViaValues[0]); |
void* iter = NULL; |
std::string value; |
@@ -88,7 +90,8 @@ bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers) { |
// 'Via: 1.1 Chrome-Compression-Proxy' |
while (headers->EnumerateHeader(&iter, "via", &value)) { |
if (value.size() >= kVersionSize + value_len && |
- !value.compare(kVersionSize, value_len, kDataReductionProxyViaValue)) |
+ !value.compare(kVersionSize, value_len, |
+ kDataReductionProxyViaValues[0])) |
return true; |
} |