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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 2125263002: Explicitly set a requestor origin when calling into WebLocalFrame::loadRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blink:: Created 4 years, 5 months 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 | « chrome/renderer/net/net_error_helper.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index d824dfe2d5ba37c9e8a9fa3b7c9e67f419e198b4..1b9d9fbf11764dcb1f67750b111a2aac416b4533 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -32,6 +32,7 @@
#include "printing/metafile_skia_wrapper.h"
#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
+#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
@@ -751,7 +752,9 @@ void PrepareFrameAndViewForPrint::CopySelection(
// When loading is done this will call didStopLoading() and that will do the
// actual printing.
- frame()->loadRequest(blink::WebURLRequest(GURL(url_str)));
+ blink::WebURLRequest request = blink::WebURLRequest(GURL(url_str));
+ request.setRequestorOrigin(blink::WebSecurityOrigin::createUnique());
+ frame()->loadRequest(request);
}
bool PrepareFrameAndViewForPrint::allowsBrokenNullLayerTreeView() const {
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698