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

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

Issue 3029025: Download code cleanup: (Closed)
Patch Set: rebase'n'final Created 10 years, 4 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
« no previous file with comments | « chrome/browser/download/download_item.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active profile in Chrome. 8 // active profile in Chrome.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // types. 231 // types.
232 bool HasAutoOpenFileTypesRegistered() const; 232 bool HasAutoOpenFileTypesRegistered() const;
233 233
234 // Overridden from SelectFileDialog::Listener: 234 // Overridden from SelectFileDialog::Listener:
235 virtual void FileSelected(const FilePath& path, int index, void* params); 235 virtual void FileSelected(const FilePath& path, int index, void* params);
236 virtual void FileSelectionCanceled(void* params); 236 virtual void FileSelectionCanceled(void* params);
237 237
238 // Deletes the specified path on the file thread. 238 // Deletes the specified path on the file thread.
239 void DeleteDownload(const FilePath& path); 239 void DeleteDownload(const FilePath& path);
240 240
241 // Called when the user has validated the donwload of a dangerous file. 241 // Called when the user has validated the download of a dangerous file.
242 void DangerousDownloadValidated(DownloadItem* download); 242 void DangerousDownloadValidated(DownloadItem* download);
243 243
244 // Used to make sure we have a safe file extension and filename for a 244 // Used to make sure we have a safe file extension and filename for a
245 // download. |file_name| can either be just the file name or it can be a 245 // download. |file_name| can either be just the file name or it can be a
246 // full path to a file. 246 // full path to a file.
247 static void GenerateSafeFileName(const std::string& mime_type, 247 static void GenerateSafeFileName(const std::string& mime_type,
248 FilePath* file_name); 248 FilePath* file_name);
249 249
250 // Create a file name based on the response from the server. 250 // Create a file name based on the response from the server.
251 static void GenerateFileName(const GURL& url, 251 static void GenerateFileName(const GURL& url,
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // Downloads are expected to have unique handles, so FakeDbHandleGenerator 466 // Downloads are expected to have unique handles, so FakeDbHandleGenerator
467 // automatically decrement the handle value on every use. 467 // automatically decrement the handle value on every use.
468 FakeDbHandleGenerator fake_db_handle_; 468 FakeDbHandleGenerator fake_db_handle_;
469 469
470 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_; 470 scoped_ptr<OtherDownloadManagerObserver> other_download_manager_observer_;
471 471
472 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 472 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
473 }; 473 };
474 474
475 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 475 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_item.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698