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

Side by Side Diff: chrome/browser/download/save_package.h

Issue 7324031: Revert 91861 - When the download folder does not exist, change the download folder to a user's "D... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
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 // Determines the saved file name based on the information of the
128 // current page, and then starts to download the page. This method
129 // runs in the background and may finish asynchronously after this
130 // method returns.
131 void GetSaveInfo(); 127 void GetSaveInfo();
132 128
133 // Statics ------------------------------------------------------------------- 129 // Statics -------------------------------------------------------------------
134 130
135 // Used to disable prompting the user for a directory/filename of the saved 131 // Used to disable prompting the user for a directory/filename of the saved
136 // web page. This is available for testing. 132 // web page. This is available for testing.
137 static void SetShouldPromptUser(bool should_prompt); 133 static void SetShouldPromptUser(bool should_prompt);
138 134
139 // Check whether we can do the saving page operation for the specified URL. 135 // Check whether we can do the saving page operation for the specified URL.
140 static bool IsSavableURL(const GURL& url); 136 static bool IsSavableURL(const GURL& url);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 friend class SavePackageTest; 318 friend class SavePackageTest;
323 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); 319 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames);
324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); 320 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename);
325 321
326 ScopedRunnableMethodFactory<SavePackage> method_factory_; 322 ScopedRunnableMethodFactory<SavePackage> method_factory_;
327 323
328 DISALLOW_COPY_AND_ASSIGN(SavePackage); 324 DISALLOW_COPY_AND_ASSIGN(SavePackage);
329 }; 325 };
330 326
331 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 327 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util_unittest.cc ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698