| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" |
| 11 |
| 10 class GURL; | 12 class GURL; |
| 11 | 13 |
| 12 namespace base { | 14 namespace base { |
| 13 class Time; | 15 class Time; |
| 14 } // namespace base | 16 } // namespace base |
| 15 | 17 |
| 16 namespace bookmarks { | 18 namespace bookmarks { |
| 17 class BookmarkModel; | 19 class BookmarkModel; |
| 18 class BookmarkNode; | 20 class BookmarkNode; |
| 19 } // namespace bookmarks | 21 } // namespace bookmarks |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 std::vector<const bookmarks::BookmarkNode*> GetRecentlyVisitedBookmarks( | 62 std::vector<const bookmarks::BookmarkNode*> GetRecentlyVisitedBookmarks( |
| 61 bookmarks::BookmarkModel* bookmark_model, | 63 bookmarks::BookmarkModel* bookmark_model, |
| 62 int max_count, | 64 int max_count, |
| 63 const base::Time& min_visit_time, | 65 const base::Time& min_visit_time, |
| 64 bool consider_visits_from_desktop); | 66 bool consider_visits_from_desktop); |
| 65 | 67 |
| 66 // Returns the list of all dismissed bookmarks. Only used for debugging. | 68 // Returns the list of all dismissed bookmarks. Only used for debugging. |
| 67 std::vector<const bookmarks::BookmarkNode*> GetDismissedBookmarksForDebugging( | 69 std::vector<const bookmarks::BookmarkNode*> GetDismissedBookmarksForDebugging( |
| 68 bookmarks::BookmarkModel* bookmark_model); | 70 bookmarks::BookmarkModel* bookmark_model); |
| 69 | 71 |
| 70 // Removes last visited date metadata for all bookmarks. | 72 // Removes last-visited data (incl. any other metadata managed by content |
| 71 void RemoveAllLastVisitDates(bookmarks::BookmarkModel* bookmark_model); | 73 // suggestions) for bookmarks within the provided time range. |
| 74 void RemoveLastVisitedDatesBetween(const base::Time& begin, |
| 75 const base::Time& end, |
| 76 base::Callback<bool(const GURL& url)> filter, |
| 77 bookmarks::BookmarkModel* bookmark_model); |
| 72 | 78 |
| 73 } // namespace ntp_snippets | 79 } // namespace ntp_snippets |
| 74 | 80 |
| 75 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 81 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ |
| OLD | NEW |