diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 08:42:51 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 08:42:51 +0000 |
commit | 35896a39fe47d8b17969a07c629c69e6a17ceb30 (patch) | |
tree | 588f2208a07630501597e3ba3ecfc6034954c7c0 /chrome/browser/profile.h | |
parent | 7ac1ce2f4d2e385c53340f501764bdd59bd86ad4 (diff) | |
download | chromium_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/browser/profile.h')
-rw-r--r-- | chrome/browser/profile.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index 7f8a6a1..5ec66d6 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -417,6 +417,10 @@ class Profile { // Returns the new tab page resource cache. virtual NTPResourceCache* GetNTPResourceCache() = 0; + // Returns the last directory that was chosen for uploading or opening a file. + virtual FilePath last_selected_directory() = 0; + virtual void set_last_selected_directory(const FilePath& path) = 0; + #ifdef UNIT_TEST // Use with caution. GetDefaultRequestContext may be called on any thread! static void set_default_request_context(URLRequestContextGetter* c) { @@ -537,6 +541,8 @@ class ProfileImpl : public Profile, virtual void InitExtensions(); virtual void InitWebResources(); virtual NTPResourceCache* GetNTPResourceCache(); + virtual FilePath last_selected_directory(); + virtual void set_last_selected_directory(const FilePath& path); virtual ProfileSyncService* GetProfileSyncService(); void InitSyncService(); virtual CloudPrintProxyService* GetCloudPrintProxyService(); |