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

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

Issue 1217503012: Avoid cross-origin iframe issues when loading PDF in print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
Index: content/browser/webui/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index 06a4c8994d43abeb4c71bae7053398cf2f27c936..9c9373197cf23b9696b8e5bf944651ae3a9210bc 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -74,6 +74,11 @@ class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
bool ShouldDenyXFrameOptions() const override {
return parent_->deny_xframe_options_;
}
+ void WillServiceRequest(const net::URLRequest* request,
+ std::string* path) const override {
+ // We want to remove any query strings from the path.
Primiano Tucci (use gerrit) 2016/01/04 18:50:38 The funny thing is that [1] relies on the opposite
+ *path = path->substr(0, path->find_first_of('?'));
+ }
private:
WebUIDataSourceImpl* parent_;
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.cc ('k') | content/browser/webui/web_ui_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698