summaryrefslogtreecommitdiffstats
path: root/chrome/test/testing_profile.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 08:42:51 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 08:42:51 +0000
commit35896a39fe47d8b17969a07c629c69e6a17ceb30 (patch)
tree588f2208a07630501597e3ba3ecfc6034954c7c0 /chrome/test/testing_profile.h
parent7ac1ce2f4d2e385c53340f501764bdd59bd86ad4 (diff)
downloadchromium_src-35896a39fe47d8b17969a07c629c69e6a17ceb30.zip
chromium_src-35896a39fe47d8b17969a07c629c69e6a17ceb30.tar.gz
chromium_src-35896a39fe47d8b17969a07c629c69e6a17ceb30.tar.bz2
Don't save last used locations in open and save dialogs when in incognito mode.
For "Save page as..." we simply don't store the save location in incognito mode. For "Open File"... and file upload controls, it's a bit more complicated: because NSOpenPanel and NSSavePanel default to using the last chosen directory from NavigationServices (which we can't influence), we provide a preference value prefs::kLastChosenDirectory as fallback there, which is not persisted in incognito mode. BUG=45064 TEST=See bug for manual test. Review URL: http://codereview.chromium.org/2450004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/testing_profile.h')
-rw-r--r--chrome/test/testing_profile.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index dac0025..50bd1fe 100644
--- a/chrome/test/testing_profile.h
+++ b/chrome/test/testing_profile.h
@@ -265,6 +265,13 @@ class TestingProfile : public Profile {
virtual DesktopNotificationService* GetDesktopNotificationService() {
return NULL;
}
+ virtual FilePath last_selected_directory() {
+ return last_selected_directory_;
+ }
+ virtual void set_last_selected_directory(const FilePath& path) {
+ last_selected_directory_ = path;
+ }
+
// Schedules a task on the history backend and runs a nested loop until the
// task is processed. This has the effect of blocking the caller until the
@@ -355,6 +362,8 @@ class TestingProfile : public Profile {
// Find bar state. Created lazily by GetFindBarState().
scoped_ptr<FindBarState> find_bar_state_;
+
+ FilePath last_selected_directory_;
};
// A profile that derives from another profile. This does not actually