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

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

Issue 43016: Change to make the 'save as...' dialog choose the default download path you h... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package.cc
===================================================================
--- chrome/browser/download/save_package.cc (revision 11442)
+++ chrome/browser/download/save_package.cc (working copy)
@@ -963,9 +963,18 @@
// If not, initialize it with default directory.
if (!prefs->IsPrefRegistered(prefs::kSaveFileDefaultDirectory)) {
FilePath default_save_path;
- if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
- &default_save_path))
- NOTREACHED();
+ if (!prefs->IsPrefRegistered(prefs::kDownloadDefaultDirectory)) {
+ if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
+ &default_save_path)) {
+ NOTREACHED();
+ }
+ } else {
+ StringPrefMember default_download_path;
+ default_download_path.Init(prefs::kDownloadDefaultDirectory,
+ prefs, NULL);
+ default_save_path = FilePath::FromWStringHack(
+ default_download_path.GetValue());
+ }
prefs->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
default_save_path);
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698