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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 126266: Change URL back to the previous one if the typed URL causes file download. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/browser/download/save_package.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents.cc (revision 18607)
+++ chrome/browser/tab_contents/tab_contents.cc (working copy)
@@ -898,6 +898,13 @@
if (tab_contents && tab_contents->delegate())
tab_contents->delegate()->OnStartDownload(download);
+
+ // Update the URL display.
+ // If the download is caused by typing in a downloadable URL, e.g.,
+ // http://example.com/somefile.zip, into the omnibox, the previous URL
+ // will reappear.
+ if (delegate())
+ delegate()->NavigationStateChanged(this, TabContents::INVALIDATE_URL);
}
void TabContents::WillClose(ConstrainedWindow* window) {
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698