| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // operations for one download. These objects live only for the duration that | 22 // operations for one download. These objects live only for the duration that |
| 23 // the download is 'in progress': once the download has been completed or | 23 // the download is 'in progress': once the download has been completed or |
| 24 // cancelled, the DownloadFile is destroyed. | 24 // cancelled, the DownloadFile is destroyed. |
| 25 class DownloadFile : public BaseFile { | 25 class DownloadFile : public BaseFile { |
| 26 public: | 26 public: |
| 27 DownloadFile(const DownloadCreateInfo* info, | 27 DownloadFile(const DownloadCreateInfo* info, |
| 28 DownloadManager* download_manager); | 28 DownloadManager* download_manager); |
| 29 virtual ~DownloadFile(); | 29 virtual ~DownloadFile(); |
| 30 | 30 |
| 31 // Cancels the download request associated with this file. | 31 // Cancels the download request associated with this file. |
| 32 void CancelDownloadRequest(ResourceDispatcherHost* rdh); | 32 void CancelDownloadRequest(); |
| 33 | 33 |
| 34 int id() const { return id_; } | 34 int id() const { return id_; } |
| 35 DownloadManager* GetDownloadManager(); | 35 DownloadManager* GetDownloadManager(); |
| 36 | 36 |
| 37 virtual std::string DebugString() const; | 37 virtual std::string DebugString() const; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // The unique identifier for this download, assigned at creation by | 40 // The unique identifier for this download, assigned at creation by |
| 41 // the DownloadFileManager for its internal record keeping. | 41 // the DownloadFileManager for its internal record keeping. |
| 42 int id_; | 42 int id_; |
| 43 | 43 |
| 44 // The handle to the process information. Used for operations outside the | 44 // The handle to the process information. Used for operations outside the |
| 45 // download system, specifically canceling a download. | 45 // download system, specifically canceling a download. |
| 46 DownloadProcessHandle process_handle_; | 46 DownloadProcessHandle process_handle_; |
| 47 | 47 |
| 48 // DownloadManager this download belongs to. | 48 // DownloadManager this download belongs to. |
| 49 scoped_refptr<DownloadManager> download_manager_; | 49 scoped_refptr<DownloadManager> download_manager_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(DownloadFile); | 51 DISALLOW_COPY_AND_ASSIGN(DownloadFile); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 54 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| OLD | NEW |