OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // Each download is represented by a DownloadItem, and all DownloadItems | 10 // Each download is represented by a DownloadItem, and all DownloadItems |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // deleted is returned back to the caller. | 349 // deleted is returned back to the caller. |
350 int RemoveDownloads(const base::Time remove_begin); | 350 int RemoveDownloads(const base::Time remove_begin); |
351 | 351 |
352 // Remove all downloads will delete all downloads. The number of downloads | 352 // Remove all downloads will delete all downloads. The number of downloads |
353 // deleted is returned back to the caller. | 353 // deleted is returned back to the caller. |
354 int RemoveAllDownloads(); | 354 int RemoveAllDownloads(); |
355 | 355 |
356 // Download the object at the URL. Used in cases such as "Save Link As..." | 356 // Download the object at the URL. Used in cases such as "Save Link As..." |
357 void DownloadUrl(const GURL& url, | 357 void DownloadUrl(const GURL& url, |
358 const GURL& referrer, | 358 const GURL& referrer, |
| 359 const std::string& referrer_encoding, |
359 WebContents* web_contents); | 360 WebContents* web_contents); |
360 | 361 |
361 // Allow objects to observe the download creation process. | 362 // Allow objects to observe the download creation process. |
362 void AddObserver(Observer* observer); | 363 void AddObserver(Observer* observer); |
363 | 364 |
364 // Remove a download observer from ourself. | 365 // Remove a download observer from ourself. |
365 void RemoveObserver(Observer* observer); | 366 void RemoveObserver(Observer* observer); |
366 | 367 |
367 // Methods called on completion of a query sent to the history system. | 368 // Methods called on completion of a query sent to the history system. |
368 void OnQueryDownloadEntriesComplete( | 369 void OnQueryDownloadEntriesComplete( |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 PendingFinishedMap pending_finished_downloads_; | 586 PendingFinishedMap pending_finished_downloads_; |
586 | 587 |
587 // The "Save As" dialog box used to ask the user where a file should be | 588 // The "Save As" dialog box used to ask the user where a file should be |
588 // saved. | 589 // saved. |
589 scoped_refptr<SelectFileDialog> select_file_dialog_; | 590 scoped_refptr<SelectFileDialog> select_file_dialog_; |
590 | 591 |
591 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 592 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
592 }; | 593 }; |
593 | 594 |
594 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 595 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
OLD | NEW |