| 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_HISTORY_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void AddEntry(DownloadItem* download_item, | 44 void AddEntry(DownloadItem* download_item, |
| 45 HistoryService::DownloadCreateCallback* callback); | 45 HistoryService::DownloadCreateCallback* callback); |
| 46 | 46 |
| 47 // Updates the history entry for |download_item|. | 47 // Updates the history entry for |download_item|. |
| 48 void UpdateEntry(DownloadItem* download_item); | 48 void UpdateEntry(DownloadItem* download_item); |
| 49 | 49 |
| 50 // Updates the download path for |download_item| to |new_path|. | 50 // Updates the download path for |download_item| to |new_path|. |
| 51 void UpdateDownloadPath(DownloadItem* download_item, | 51 void UpdateDownloadPath(DownloadItem* download_item, |
| 52 const FilePath& new_path); | 52 const FilePath& new_path); |
| 53 | 53 |
| 54 // Removes |download_item| from the history database. | 54 // Removes the download identified by |db_handle| from the history database. |
| 55 void RemoveEntry(DownloadItem* download_item); | 55 // |db_handle| is used instead of the DownloadItem pointer to allow |
| 56 // removal after deletion of the download item. |
| 57 void RemoveEntry(int64 db_handle); |
| 56 | 58 |
| 57 // Removes download-related history entries in the given time range. | 59 // Removes download-related history entries in the given time range. |
| 58 void RemoveEntriesBetween(const base::Time remove_begin, | 60 void RemoveEntriesBetween(const base::Time remove_begin, |
| 59 const base::Time remove_end); | 61 const base::Time remove_end); |
| 60 | 62 |
| 61 // Returns a new unique database handle which will not collide with real ones. | 63 // Returns a new unique database handle which will not collide with real ones. |
| 62 int64 GetNextFakeDbHandle(); | 64 int64 GetNextFakeDbHandle(); |
| 63 | 65 |
| 64 private: | 66 private: |
| 65 typedef std::map<HistoryService::Handle, | 67 typedef std::map<HistoryService::Handle, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 81 | 83 |
| 82 CancelableRequestConsumer history_consumer_; | 84 CancelableRequestConsumer history_consumer_; |
| 83 | 85 |
| 84 // The outstanding requests made by CheckVisitedReferrerBefore(). | 86 // The outstanding requests made by CheckVisitedReferrerBefore(). |
| 85 VisitedBeforeRequestsMap visited_before_requests_; | 87 VisitedBeforeRequestsMap visited_before_requests_; |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); | 89 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ | 92 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| OLD | NEW |