summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 18:13:53 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-09 18:13:53 +0000
commite5d2f713578962c4a2dc25dffe4002bb4153bfcb (patch)
treef8026c823028e7b835259c18ed2685f771cef244 /chrome/browser/profile.cc
parent51b623da27ffd93a28b03377d43a407f7811d292 (diff)
downloadchromium_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/profile.cc')
-rw-r--r--chrome/browser/profile.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index f1593ae..83b2ad3e 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/favicon_service.h"
+#include "chrome/browser/find_bar_state.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/spellcheck_host.h"
#include "chrome/browser/transport_security_persister.h"
@@ -454,6 +455,12 @@ class OffTheRecordProfileImpl : public Profile,
return profile_->GetUserStyleSheetWatcher();
}
+ virtual FindBarState* GetFindBarState() {
+ if (!find_bar_state_.get())
+ find_bar_state_.reset(new FindBarState());
+ return find_bar_state_.get();
+ }
+
virtual SessionService* GetSessionService() {
// Don't save any sessions when off the record.
return NULL;
@@ -585,6 +592,10 @@ class OffTheRecordProfileImpl : public Profile,
// the user visited while OTR.
scoped_ptr<SSLHostState> ssl_host_state_;
+ // Use a separate FindBarState so search terms do not leak back to the main
+ // profile.
+ scoped_ptr<FindBarState> find_bar_state_;
+
// The TransportSecurityState that only stores enabled sites in memory.
scoped_refptr<net::TransportSecurityState>
transport_security_state_;
@@ -1083,6 +1094,13 @@ UserStyleSheetWatcher* ProfileImpl::GetUserStyleSheetWatcher() {
return user_style_sheet_watcher_.get();
}
+FindBarState* ProfileImpl::GetFindBarState() {
+ if (!find_bar_state_.get()) {
+ find_bar_state_.reset(new FindBarState());
+ }
+ return find_bar_state_.get();
+}
+
HistoryService* ProfileImpl::GetHistoryService(ServiceAccessType sat) {
if (!history_service_created_) {
history_service_created_ = true;