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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 9808029: Prepending view-source: does not load the source of the userscript. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: TabContents is now WebContentsImpl Created 8 years, 8 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 | « content/browser/renderer_host/resource_dispatcher_host_impl.cc ('k') | content/common/request_extra_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7cb9e0ed1be43cbf47c9b7c47186fed214549f16..fe52ac01886bedfc97b83dcbff7cf5a70b23bc6f 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -215,6 +215,9 @@ void MakeNavigateParams(const NavigationEntryImpl& entry,
entry.transferred_global_request_id().child_id;
params->transferred_request_request_id =
entry.transferred_global_request_id().request_id;
+ // We only want to allow downloading if "view-source:" is not pre-pended.
darin (slow to review) 2012/04/26 21:54:49 nit: no need to repeat the code so precisely in th
+ params->allow_download =
+ !entry.GetVirtualURL().SchemeIs(chrome::kViewSourceScheme);
if (delegate)
delegate->AddNavigationHeaders(params->url, &params->extra_headers);
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_impl.cc ('k') | content/common/request_extra_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698