Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: chrome/browser/download/save_package.cc

Issue 2450004: Don't save last used locations in open and save dialogs when in incognito mode. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Rename kLastSelectedDirectory to kSelectFileLastDirectory. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package.cc
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 0510653feeeabdc78e7c10f0958601da752c9764..8c841b669660e26e10fb09741a4bcdb5584202d1 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 :
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698