summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 17:10:29 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 17:10:29 +0000
commit0a4a3c159a119fd094c805158eb6a55d2c007601 (patch)
treeb3b026ce0b45fc9babc90ecd232bb7805756e1d5 /chrome/browser/browser.cc
parent20142ba1b6c593896a894699d1971c4271456a20 (diff)
downloadchromium_src-0a4a3c159a119fd094c805158eb6a55d2c007601.zip
chromium_src-0a4a3c159a119fd094c805158eb6a55d2c007601.tar.gz
chromium_src-0a4a3c159a119fd094c805158eb6a55d2c007601.tar.bz2
Reset the omnibox contents when the user reloads the page. Patch by Yusuke Sato (see http://codereview.chromium.org/100198 ), r=me.
BUG=2985 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 53b5c31..145c600 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -685,6 +685,11 @@ void Browser::Reload() {
return;
}
+ // Forcibly reset the location bar, since otherwise it won't discard any
+ // ongoing user edits, since it doesn't realize this is a user-initiated
+ // action.
+ window_->GetLocationBar()->Revert();
+
// As this is caused by a user action, give the focus to the page.
current_tab->Focus();
current_tab->controller().Reload(true);