| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 void GenerateExtension(const FilePath& file_name, | 489 void GenerateExtension(const FilePath& file_name, |
| 490 const std::string& mime_type, | 490 const std::string& mime_type, |
| 491 FilePath::StringType* generated_extension); | 491 FilePath::StringType* generated_extension); |
| 492 | 492 |
| 493 // Create a file name based on the response from the server. | 493 // Create a file name based on the response from the server. |
| 494 void GenerateFilename(DownloadCreateInfo* info, FilePath* generated_name); | 494 void GenerateFilename(DownloadCreateInfo* info, FilePath* generated_name); |
| 495 | 495 |
| 496 // Persist the automatic opening preference. | 496 // Persist the automatic opening preference. |
| 497 void SaveAutoOpens(); | 497 void SaveAutoOpens(); |
| 498 | 498 |
| 499 // Download cancel helper function. |
| 500 void DownloadCancelledInternal(int download_id, |
| 501 int render_process_id, |
| 502 int request_id); |
| 503 |
| 499 // Runs the network cancel on the IO thread. | 504 // Runs the network cancel on the IO thread. |
| 500 static void OnCancelDownloadRequest(ResourceDispatcherHost* rdh, | 505 static void OnCancelDownloadRequest(ResourceDispatcherHost* rdh, |
| 501 int render_process_id, | 506 int render_process_id, |
| 502 int request_id); | 507 int request_id); |
| 503 | 508 |
| 504 // Runs the pause on the IO thread. | 509 // Runs the pause on the IO thread. |
| 505 static void OnPauseDownloadRequest(ResourceDispatcherHost* rdh, | 510 static void OnPauseDownloadRequest(ResourceDispatcherHost* rdh, |
| 506 int render_process_id, | 511 int render_process_id, |
| 507 int request_id, | 512 int request_id, |
| 508 bool pause); | 513 bool pause); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 PendingFinishedMap pending_finished_downloads_; | 614 PendingFinishedMap pending_finished_downloads_; |
| 610 | 615 |
| 611 // The "Save As" dialog box used to ask the user where a file should be | 616 // The "Save As" dialog box used to ask the user where a file should be |
| 612 // saved. | 617 // saved. |
| 613 scoped_refptr<SelectFileDialog> select_file_dialog_; | 618 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 614 | 619 |
| 615 DISALLOW_COPY_AND_ASSIGN(DownloadManager); | 620 DISALLOW_COPY_AND_ASSIGN(DownloadManager); |
| 616 }; | 621 }; |
| 617 | 622 |
| 618 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ | 623 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |