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_state.h | |
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_state.h')
-rw-r--r-- | chrome/browser/find_bar_state.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/chrome/browser/find_bar_state.h b/chrome/browser/find_bar_state.h new file mode 100644 index 0000000..026caac --- /dev/null +++ b/chrome/browser/find_bar_state.h @@ -0,0 +1,40 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Stores per-profile state needed for find in page. This includes the most +// recently searched for term. + +#ifndef CHROME_BROWSER_FIND_BAR_STATE_H_ +#define CHROME_BROWSER_FIND_BAR_STATE_H_ + +#include "base/basictypes.h" +#include "base/string16.h" + +class Profile; + +class FindBarState { + public: + FindBarState() {} + ~FindBarState() {} + + string16 last_prepopulate_text() const { + return last_prepopulate_text_; + } + + void set_last_prepopulate_text(const string16 text) { + last_prepopulate_text_ = text; + } + + // Retrieves the last prepopulate text for a given Profile. If the profile is + // off the record and has an empty prepopulate text, falls back to the + // prepopulate text from the normal profile. + static string16 GetLastPrepopulateText(Profile* profile); + + private: + string16 last_prepopulate_text_; + + DISALLOW_COPY_AND_ASSIGN(FindBarState); +}; + +#endif // CHROME_BROWSER_FIND_BAR_STATE_H_ |