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/download | |
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/download')
-rw-r--r-- | chrome/browser/download/save_package.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc index 0510653..8c841b6 100644 --- a/chrome/browser/download/save_package.cc +++ b/chrome/browser/download/save_package.cc @@ -1268,7 +1268,8 @@ void SavePackage::ContinueSave(SavePackageParam* param, save_file_path.Init(prefs::kSaveFileDefaultDirectory, prefs, NULL); // If user change the default saving directory, we will remember it just // like IE and FireFox. - if (save_file_path.GetValue() != param->dir.ToWStringHack()) + if (!tab_contents_->profile()->IsOffTheRecord() && + save_file_path.GetValue() != param->dir.ToWStringHack()) save_file_path.SetValue(param->dir.ToWStringHack()); param->save_type = (index == 1) ? SavePackage::SAVE_AS_ONLY_HTML : |