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

Unified Diff: chrome/browser/download/download_prefs.h

Issue 6973052: When the download folder does not exist, change the download folder to a user's "Downloads" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Overrides the user's "Downloads" folder in DownloadPrefs Created 9 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
Index: chrome/browser/download/download_prefs.h
diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h
index cd7bad44e961bc81369d67d8d1d3d9be28c9dce3..b71a7a111efca929a8b691fcf4217e9f96478f93 100644
--- a/chrome/browser/download/download_prefs.h
+++ b/chrome/browser/download/download_prefs.h
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "chrome/browser/prefs/pref_member.h"
+#include "chrome/browser/download/download_test_util.h"
Paweł Hajdan Jr. 2011/06/15 09:31:33 This #include shouldn't be here. I don't think it'
haraken1 2011/06/15 10:39:45 Done. Instead, I added "namespace download_test_ut
class PrefService;
@@ -48,14 +49,25 @@ class DownloadPrefs {
void ResetAutoOpen();
+ FilePath GetDefaultDownloadDirectory();
+
private:
+ friend class download_test_util::ScopedDefaultDownloadDirectory;
+
void SaveAutoOpenState();
+ // This method can be used only through ScopedDefaultDownloadDirectory.
+ void OverrideDefaultDownloadDirectory(const FilePath& override_path);
+
+ // This method can be used only through ScopedDefaultDownloadDirectory.
+ void UnOverrideDefaultDownloadDirectory();
+
PrefService* prefs_;
BooleanPrefMember prompt_for_download_;
FilePathPrefMember download_path_;
IntegerPrefMember save_file_type_;
+ FilePath override_path_;
Paweł Hajdan Jr. 2011/06/15 09:31:33 nit: override_default_download_directory_? "path"
haraken1 2011/06/15 10:39:45 I renamed it to |override_default_download_dir_|.
// Set of file extensions to open at download completion.
struct AutoOpenCompareFunctor {

Powered by Google App Engine
This is Rietveld 408576698