OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |