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