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 ad8fee16a7ce064a1fdf89be4f3ec1648b929ef2..cc5372c7b08203859d5b365cb16ee9abca4ec458 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -81,6 +81,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" |
@@ -1643,3 +1644,18 @@ void ChromeContentRendererClient::RecordRapporURL(const std::string& metric, |
const GURL& url) { |
RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); |
} |
+ |
+ |
+void ChromeContentRendererClient::AddContextMenuProperties( |
+ const blink::WebURLResponse& response, |
+ std::map<std::string, std::string>* properties) { |
+ DCHECK(properties); |
+ const char lo_fi_header_key[] = "Chrome-Proxy"; |
Lei Zhang
2015/05/13 23:50:19
Aren't the same values also seen in RenderViewCont
megjablon
2015/05/14 19:26:25
They're used little different in DRPRequestOptions
|
+ const char lo_fi_header_value[] = "q=low"; |
+ WebString header_key(ASCIIToUTF16(lo_fi_header_key)); |
+ if (!response.httpHeaderField(header_key).isNull() && |
+ response.httpHeaderField(header_key).utf8().find(lo_fi_header_value) != |
+ std::string::npos) { |
+ (*properties)[lo_fi_header_key] = lo_fi_header_value; |
+ } |
+} |