diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 18:13:53 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 18:13:53 +0000 |
commit | e5d2f713578962c4a2dc25dffe4002bb4153bfcb (patch) | |
tree | f8026c823028e7b835259c18ed2685f771cef244 /chrome/browser/find_bar_controller.cc | |
parent | 51b623da27ffd93a28b03377d43a407f7811d292 (diff) | |
download | chromium_src-e5d2f713578962c4a2dc25dffe4002bb4153bfcb.zip chromium_src-e5d2f713578962c4a2dc25dffe4002bb4153bfcb.tar.gz chromium_src-e5d2f713578962c4a2dc25dffe4002bb4153bfcb.tar.bz2 |
Do not prepopulate the findbar with incognito search terms.
BUG=32021
TEST=On win/linux, open an incognito window and search for some term. Then open a new normal tab and press Ctrl-F. Findbar should not be prepopoulated with your incognito search term.
Review URL: http://codereview.chromium.org/1561018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar_controller.cc')
-rw-r--r-- | chrome/browser/find_bar_controller.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/find_bar_controller.cc b/chrome/browser/find_bar_controller.cc index 643e777..954cab9 100644 --- a/chrome/browser/find_bar_controller.cc +++ b/chrome/browser/find_bar_controller.cc @@ -7,6 +7,7 @@ #include "base/i18n/rtl.h" #include "build/build_config.h" #include "chrome/browser/find_bar.h" +#include "chrome/browser/find_bar_state.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/common/notification_service.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -202,8 +203,10 @@ void FindBarController::MaybeSetPrepopulateText() { string16 find_string = tab_contents_->find_text(); if (find_string.empty()) find_string = tab_contents_->previous_find_text(); - if (find_string.empty()) - find_string = tab_contents_->find_prepopulate_text(); + if (find_string.empty()) { + find_string = + FindBarState::GetLastPrepopulateText(tab_contents_->profile()); + } // Update the find bar with existing results and search text, regardless of // whether or not the find bar is visible, so that if it's subsequently |