|
|
DescriptionPDF: Set a referrer when performing a SaveAs operation.
Currently, the plugin's frame's url is
chrome-extension://[pdf_extension_id]/index-material.html
and that gets sanitized to nothing. Instead, just use the document's
URL, like in r327641.
BUG=563137
Committed: https://crrev.com/0ca92d66237c1b0bd1321111538b47c10daf54d7
Cr-Commit-Position: refs/heads/master@{#364498}
Patch Set 1 #
Total comments: 4
Patch Set 2 : #Messages
Total messages: 15 (5 generated)
thestig@chromium.org changed reviewers: + jochen@chromium.org, raymes@chromium.org
raymes@chromium.org changed reviewers: + sammc@chromium.org
I don't really know what the right thing to do here is, but I vaguely remember having a chat with Sam about referrers (+sammc in case he has any thoughts). I defer to jochen.
I think the previous discussion was actually around r327641. Matching that behaviour seems reasonable to me.
https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... File components/pdf/renderer/pepper_pdf_host.cc (right): https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... components/pdf/renderer/pepper_pdf_host.cc:157: referrer.url = url; can you still use the document's referrerPolicy?
https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... File components/pdf/renderer/pepper_pdf_host.cc (right): https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... components/pdf/renderer/pepper_pdf_host.cc:157: referrer.url = url; On 2015/12/09 15:41:33, jochen wrote: > can you still use the document's referrerPolicy? In my limited testing, the document's referrer policy is always 1, AKA WebReferrerPolicyDefault, which is the same as the value set by the Referrer. But if you really prefer the document's policy, let me know.
lgtm with comment https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... File components/pdf/renderer/pepper_pdf_host.cc (right): https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... components/pdf/renderer/pepper_pdf_host.cc:157: referrer.url = url; On 2015/12/09 at 17:21:15, Lei Zhang wrote: > On 2015/12/09 15:41:33, jochen wrote: > > can you still use the document's referrerPolicy? > > In my limited testing, the document's referrer policy is always 1, AKA WebReferrerPolicyDefault, which is the same as the value set by the Referrer. But if you really prefer the document's policy, let me know. hum, yeah. so in the future, we'll be able to set the referrer policy via http headers. But I guess the document() is still just going to be the extension. can you set the policy explicitly to WebReferrerPolicyDefault then? That'll make it easier to spot this place in the future
https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... File components/pdf/renderer/pepper_pdf_host.cc (right): https://codereview.chromium.org/1510993002/diff/1/components/pdf/renderer/pep... components/pdf/renderer/pepper_pdf_host.cc:157: referrer.url = url; On 2015/12/10 15:34:05, jochen wrote: > On 2015/12/09 at 17:21:15, Lei Zhang wrote: > > On 2015/12/09 15:41:33, jochen wrote: > > > can you still use the document's referrerPolicy? > > > > In my limited testing, the document's referrer policy is always 1, AKA > WebReferrerPolicyDefault, which is the same as the value set by the Referrer. > But if you really prefer the document's policy, let me know. > > hum, yeah. > > so in the future, we'll be able to set the referrer policy via http headers. But > I guess the document() is still just going to be the extension. > > can you set the policy explicitly to WebReferrerPolicyDefault then? That'll make > it easier to spot this place in the future Done.
The CQ bit was checked by thestig@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jochen@chromium.org Link to the patchset: https://codereview.chromium.org/1510993002/#ps20001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1510993002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1510993002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== PDF: Set a referrer when performing a SaveAs operation. Currently, the plugin's frame's url is chrome-extension://[pdf_extension_id]/index-material.html and that gets sanitized to nothing. Instead, just use the document's URL, like in r327641. BUG=563137 ========== to ========== PDF: Set a referrer when performing a SaveAs operation. Currently, the plugin's frame's url is chrome-extension://[pdf_extension_id]/index-material.html and that gets sanitized to nothing. Instead, just use the document's URL, like in r327641. BUG=563137 Committed: https://crrev.com/0ca92d66237c1b0bd1321111538b47c10daf54d7 Cr-Commit-Position: refs/heads/master@{#364498} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/0ca92d66237c1b0bd1321111538b47c10daf54d7 Cr-Commit-Position: refs/heads/master@{#364498} |