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

Side by Side Diff: chrome/browser/download/download_file_manager.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: Reflected Pawel's comments 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 // The DownloadFileManager owns a set of DownloadFile objects, each of which 5 // The DownloadFileManager owns a set of DownloadFile objects, each of which
6 // represent one in progress download and performs the disk IO for that 6 // represent one in progress download and performs the disk IO for that
7 // download. The DownloadFileManager itself is a singleton object owned by the 7 // download. The DownloadFileManager itself is a singleton object owned by the
8 // ResourceDispatcherHost. 8 // ResourceDispatcherHost.
9 // 9 //
10 // The DownloadFileManager uses the file_thread for performing file write 10 // The DownloadFileManager uses the file_thread for performing file write
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void StopUpdateTimer(); 133 void StopUpdateTimer();
134 void UpdateInProgressDownloads(); 134 void UpdateInProgressDownloads();
135 135
136 // Clean up helper that runs on the download thread. 136 // Clean up helper that runs on the download thread.
137 void OnShutdown(); 137 void OnShutdown();
138 138
139 // Creates DownloadFile on FILE thread and continues starting the download 139 // Creates DownloadFile on FILE thread and continues starting the download
140 // process. 140 // process.
141 void CreateDownloadFile(DownloadCreateInfo* info, 141 void CreateDownloadFile(DownloadCreateInfo* info,
142 DownloadManager* download_manager, 142 DownloadManager* download_manager,
143 bool hash_needed); 143 bool hash_needed,
144 const FilePath& default_download_dir);
144 145
145 // Called only on the download thread. 146 // Called only on the download thread.
146 DownloadFile* GetDownloadFile(int id); 147 DownloadFile* GetDownloadFile(int id);
147 148
148 // Called only from RenameInProgressDownloadFile and 149 // Called only from RenameInProgressDownloadFile and
149 // RenameCompletingDownloadFile on the FILE thread. 150 // RenameCompletingDownloadFile on the FILE thread.
150 void CancelDownloadOnRename(int id); 151 void CancelDownloadOnRename(int id);
151 152
152 // Erases the download file with the given the download |id| and removes 153 // Erases the download file with the given the download |id| and removes
153 // it from the maps. 154 // it from the maps.
(...skipping 10 matching lines...) Expand all
164 // Schedule periodic updates of the download progress. This timer 165 // Schedule periodic updates of the download progress. This timer
165 // is controlled from the FILE thread, and posts updates to the UI thread. 166 // is controlled from the FILE thread, and posts updates to the UI thread.
166 base::RepeatingTimer<DownloadFileManager> update_timer_; 167 base::RepeatingTimer<DownloadFileManager> update_timer_;
167 168
168 ResourceDispatcherHost* resource_dispatcher_host_; 169 ResourceDispatcherHost* resource_dispatcher_host_;
169 170
170 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager); 171 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager);
171 }; 172 };
172 173
173 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ 174 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698