Index: content/browser/tab_contents/tab_contents.cc |
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc |
index 9f783d0b931986641db42717f577078d2a274ccb..6566c268eef8bcb6e871f27a778e9dc727927b65 100644 |
--- a/content/browser/tab_contents/tab_contents.cc |
+++ b/content/browser/tab_contents/tab_contents.cc |
@@ -200,6 +200,9 @@ void MakeNavigateParams(const NavigationEntryImpl& entry, |
params->current_history_list_offset = controller.GetLastCommittedEntryIndex(); |
params->current_history_list_length = controller.GetEntryCount(); |
params->url = entry.GetURL(); |
+ // We only want to allow downloading if "view-source:" is not pre-pended. |
+ params->allow_download = |
+ !entry.GetVirtualURL().SchemeIs(chrome::kViewSourceScheme); |
params->referrer = entry.GetReferrer(); |
params->transition = entry.GetTransitionType(); |
params->state = entry.GetContentState(); |