| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // download to its persistent store. When the delegate is done, it calls | 105 // download to its persistent store. When the delegate is done, it calls |
| 106 // DownloadManager::OnDownloadItemAddedToPersistentStore. | 106 // DownloadManager::OnDownloadItemAddedToPersistentStore. |
| 107 virtual void AddItemToPersistentStore(DownloadItem* item) {} | 107 virtual void AddItemToPersistentStore(DownloadItem* item) {} |
| 108 | 108 |
| 109 // Notifies the delegate that information about the given download has change, | 109 // Notifies the delegate that information about the given download has change, |
| 110 // so that it can update its persistent store. | 110 // so that it can update its persistent store. |
| 111 // Does not update |url|, |start_time|, |total_bytes|; uses |db_handle| only | 111 // Does not update |url|, |start_time|, |total_bytes|; uses |db_handle| only |
| 112 // to select the row in the database table to update. | 112 // to select the row in the database table to update. |
| 113 virtual void UpdateItemInPersistentStore(DownloadItem* item) {} | 113 virtual void UpdateItemInPersistentStore(DownloadItem* item) {} |
| 114 | 114 |
| 115 // Notifies the delegate that path for the download item has changed, so that | 115 // Notifies the delegate that paths for the download item has changed, so that |
| 116 // it can update its persistent store. | 116 // it can update its persistent store. |
| 117 virtual void UpdatePathForItemInPersistentStore( | 117 virtual void UpdatePathForItemInPersistentStore( |
| 118 DownloadItem* item, | 118 DownloadItem* item, |
| 119 const FilePath& new_path) {} | 119 const FilePath& target_path, |
| 120 const FilePath& current_path) {} |
| 120 | 121 |
| 121 // Notifies the delegate that it should remove the download item from its | 122 // Notifies the delegate that it should remove the download item from its |
| 122 // persistent store. | 123 // persistent store. |
| 123 virtual void RemoveItemFromPersistentStore(DownloadItem* item) {} | 124 virtual void RemoveItemFromPersistentStore(DownloadItem* item) {} |
| 124 | 125 |
| 125 // Notifies the delegate to remove downloads from the given time range. | 126 // Notifies the delegate to remove downloads from the given time range. |
| 126 virtual void RemoveItemsFromPersistentStoreBetween( | 127 virtual void RemoveItemsFromPersistentStoreBetween( |
| 127 base::Time remove_begin, | 128 base::Time remove_begin, |
| 128 base::Time remove_end) {} | 129 base::Time remove_end) {} |
| 129 | 130 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 142 const SavePackagePathPickedCallback& callback) { | 143 const SavePackagePathPickedCallback& callback) { |
| 143 } | 144 } |
| 144 | 145 |
| 145 protected: | 146 protected: |
| 146 virtual ~DownloadManagerDelegate(); | 147 virtual ~DownloadManagerDelegate(); |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 } // namespace content | 150 } // namespace content |
| 150 | 151 |
| 151 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ | 152 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_ |
| OLD | NEW |