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

Side by Side Diff: chrome/browser/download/save_package.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: Correct typo 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Show or Open a saved page via the Windows shell. 118 // Show or Open a saved page via the Windows shell.
119 void ShowDownloadInShell(); 119 void ShowDownloadInShell();
120 120
121 bool canceled() const { return user_canceled_ || disk_error_occurred_; } 121 bool canceled() const { return user_canceled_ || disk_error_occurred_; }
122 bool finished() const { return finished_; } 122 bool finished() const { return finished_; }
123 SavePackageType save_type() const { return save_type_; } 123 SavePackageType save_type() const { return save_type_; }
124 int tab_id() const { return tab_id_; } 124 int tab_id() const { return tab_id_; }
125 int id() const { return unique_id_; } 125 int id() const { return unique_id_; }
126 126
127 void GetSaveInfo(); 127 void GetSaveInfo();
128 128 void GetSaveInfo(const FilePath& website_save_dir,
Paweł Hajdan Jr. 2011/05/30 14:15:49 I think that a comment should get added. Why do we
haraken1 2011/05/31 12:41:31 Done.
129 const FilePath& download_save_dir,
130 SavePackageType save_type);
Paweł Hajdan Jr. 2011/05/30 14:15:49 nit: Add empty line below.
haraken1 2011/05/31 12:41:31 Done.
129 // Statics ------------------------------------------------------------------- 131 // Statics -------------------------------------------------------------------
130 132
131 // Used to disable prompting the user for a directory/filename of the saved 133 // Used to disable prompting the user for a directory/filename of the saved
132 // web page. This is available for testing. 134 // web page. This is available for testing.
133 static void SetShouldPromptUser(bool should_prompt); 135 static void SetShouldPromptUser(bool should_prompt);
134 136
135 // Check whether we can do the saving page operation for the specified URL. 137 // Check whether we can do the saving page operation for the specified URL.
136 static bool IsSavableURL(const GURL& url); 138 static bool IsSavableURL(const GURL& url);
137 139
138 // Check whether we can do the saving page operation for the contents which 140 // Check whether we can do the saving page operation for the contents which
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 friend class SavePackageTest; 320 friend class SavePackageTest;
319 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); 321 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames);
320 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); 322 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename);
321 323
322 ScopedRunnableMethodFactory<SavePackage> method_factory_; 324 ScopedRunnableMethodFactory<SavePackage> method_factory_;
323 325
324 DISALLOW_COPY_AND_ASSIGN(SavePackage); 326 DISALLOW_COPY_AND_ASSIGN(SavePackage);
325 }; 327 };
326 328
327 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 329 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698