Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / renderer / page_load_histograms.cc
index 7ff0c9c..1b60fac 100644 (file)
@@ -24,6 +24,7 @@
 #include "content/public/renderer/render_view.h"
 #include "extensions/common/url_pattern.h"
 #include "net/base/url_util.h"
+#include "net/http/http_response_headers.h"
 #include "third_party/WebKit/public/platform/WebURLRequest.h"
 #include "third_party/WebKit/public/platform/WebURLResponse.h"
 #include "third_party/WebKit/public/web/WebDocument.h"
 #include "third_party/WebKit/public/web/WebView.h"
 #include "url/gurl.h"
 
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
-#include "net/http/http_response_headers.h"
-#endif
-
 using blink::WebDataSource;
 using blink::WebFrame;
 using blink::WebPerformance;
@@ -199,7 +196,6 @@ bool ViaHeaderContains(WebFrame* frame, const std::string& via_value) {
 // TODO(bengr): Plumb the hostname of the proxy and check if it matches
 // |SPDY_PROXY_AUTH_ORIGIN|.
 bool DataReductionProxyWasUsed(WebFrame* frame) {
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
   DocumentState* document_state =
       DocumentState::FromDataSource(frame->dataSource());
   if (!document_state->was_fetched_via_proxy())
@@ -215,10 +211,7 @@ bool DataReductionProxyWasUsed(WebFrame* frame) {
   std::replace(headers.begin(), headers.end(), '\n', '\0');
   scoped_refptr<net::HttpResponseHeaders> response_headers(
       new net::HttpResponseHeaders(headers));
-  return response_headers->IsChromeProxyResponse();
-#else
-  return false;
-#endif
+  return response_headers->IsDataReductionProxyResponse();
 }
 
 // Returns true if the provided URL is a referrer string that came from