Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: components/pdf/renderer/pepper_pdf_host.cc

Issue 1510993002: PDF: Set a referrer when performing a SaveAs operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pdf/renderer/pepper_pdf_host.cc
diff --git a/components/pdf/renderer/pepper_pdf_host.cc b/components/pdf/renderer/pepper_pdf_host.cc
index eea157f86cd1fce64b917985a12804be899a3eb2..11b3b0642363c10ae288233e6edffccb5f72a682 100644
--- a/components/pdf/renderer/pepper_pdf_host.cc
+++ b/components/pdf/renderer/pepper_pdf_host.cc
@@ -153,11 +153,9 @@ int32_t PepperPDFHost::OnHostMsgSaveAs(
return PP_ERROR_FAILED;
GURL url = instance->GetPluginURL();
content::RenderView* render_view = instance->GetRenderView();
- blink::WebLocalFrame* frame =
- render_view->GetWebView()->mainFrame()->toWebLocalFrame();
- content::Referrer referrer = content::Referrer::SanitizeForRequest(
- url, content::Referrer(frame->document().url(),
- frame->document().referrerPolicy()));
+ content::Referrer referrer;
+ referrer.url = url;
jochen (gone - plz use gerrit) 2015/12/09 15:41:33 can you still use the document's referrerPolicy?
Lei Zhang 2015/12/09 17:21:15 In my limited testing, the document's referrer pol
jochen (gone - plz use gerrit) 2015/12/10 15:34:05 hum, yeah. so in the future, we'll be able to set
Lei Zhang 2015/12/10 21:57:38 Done.
+ referrer = content::Referrer::SanitizeForRequest(url, referrer);
render_view->Send(
new PDFHostMsg_PDFSaveURLAs(render_view->GetRoutingID(), url, referrer));
return PP_OK;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698