Index: chrome/renderer/chrome_content_renderer_client.cc |
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc |
index 8e92dfcea4547c48ee1f72f33511004d7957dc43..5378faf3cbc2b2c0029c0415dc87e746a80628da 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -59,6 +59,7 @@ |
#include "components/autofill/content/renderer/password_autofill_agent.h" |
#include "components/autofill/content/renderer/password_generation_agent.h" |
#include "components/content_settings/core/common/content_settings_pattern.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h" |
#include "components/dom_distiller/core/url_constants.h" |
#include "components/nacl/renderer/ppb_nacl_private.h" |
#include "components/nacl/renderer/ppb_nacl_private_impl.h" |
@@ -83,6 +84,7 @@ |
#include "third_party/WebKit/public/platform/WebURL.h" |
#include "third_party/WebKit/public/platform/WebURLError.h" |
#include "third_party/WebKit/public/platform/WebURLRequest.h" |
+#include "third_party/WebKit/public/platform/WebURLResponse.h" |
#include "third_party/WebKit/public/web/WebCache.h" |
#include "third_party/WebKit/public/web/WebDataSource.h" |
#include "third_party/WebKit/public/web/WebDocument.h" |
@@ -1653,3 +1655,17 @@ ChromeContentRendererClient::CreateAppBannerClient( |
return scoped_ptr<blink::WebAppBannerClient>( |
new AppBannerClient(render_frame)); |
} |
+ |
+void ChromeContentRendererClient::AddContextMenuProperties( |
+ const blink::WebURLResponse& response, |
+ std::map<std::string, std::string>* properties) { |
+ DCHECK(properties); |
+ WebString header_key(ASCIIToUTF16(data_reduction_proxy::kChromeProxyHeader)); |
+ if (!response.httpHeaderField(header_key).isNull() && |
+ response.httpHeaderField(header_key).utf8().find( |
+ data_reduction_proxy::kChromeProxyLoFiDirective) != |
+ std::string::npos) { |
+ (*properties)[data_reduction_proxy::kChromeProxyHeader] = |
+ data_reduction_proxy::kChromeProxyLoFiDirective; |
+ } |
+} |