Chromium Code Reviews| 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 const std::string& hash) = 0; | 67 const std::string& hash) = 0; |
| 68 | 68 |
| 69 // Notifies the delegate that a new download item is created. The | 69 // Notifies the delegate that a new download item is created. The |
| 70 // DownloadManager waits for the delegate to add information about this | 70 // DownloadManager waits for the delegate to add information about this |
| 71 // download to its persistent store. When the delegate is done, it calls | 71 // download to its persistent store. When the delegate is done, it calls |
| 72 // DownloadManager::OnDownloadItemAddedToPersistentStore. | 72 // DownloadManager::OnDownloadItemAddedToPersistentStore. |
| 73 virtual void AddItemToPersistentStore(DownloadItem* item) = 0; | 73 virtual void AddItemToPersistentStore(DownloadItem* item) = 0; |
| 74 | 74 |
| 75 // Notifies the delegate that information about the given download has change, | 75 // Notifies the delegate that information about the given download has change, |
| 76 // so that it can update its persistent store. | 76 // so that it can update its persistent store. |
| 77 // Does not update |url|, |start_time|, |total_bytes|, or |db_handle|. | |
|
Randy Smith (Not in Mondays)
2011/10/04 18:34:31
See previous comment on previous instance of this
benjhayden
2011/10/06 21:25:16
Done.
| |
| 77 virtual void UpdateItemInPersistentStore(DownloadItem* item) = 0; | 78 virtual void UpdateItemInPersistentStore(DownloadItem* item) = 0; |
| 78 | 79 |
| 79 // Notifies the delegate that path for the download item has changed, so that | 80 // Notifies the delegate that path for the download item has changed, so that |
| 80 // it can update its persistent store. | 81 // it can update its persistent store. |
| 81 virtual void UpdatePathForItemInPersistentStore( | 82 virtual void UpdatePathForItemInPersistentStore( |
| 82 DownloadItem* item, | 83 DownloadItem* item, |
| 83 const FilePath& new_path) = 0; | 84 const FilePath& new_path) = 0; |
| 84 | 85 |
| 85 // Notifies the delegate that it should remove the download item from its | 86 // Notifies the delegate that it should remove the download item from its |
| 86 // persistent store. | 87 // persistent store. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 105 // Informs the delegate that the progress of downloads has changed. | 106 // Informs the delegate that the progress of downloads has changed. |
| 106 virtual void DownloadProgressUpdated() = 0; | 107 virtual void DownloadProgressUpdated() = 0; |
| 107 | 108 |
| 108 protected: | 109 protected: |
| 109 DownloadManagerDelegate() {} | 110 DownloadManagerDelegate() {} |
| 110 | 111 |
| 111 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate); | 112 DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate); |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ | 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |