Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h

Issue 2222933002: Make bookmark suggestions dismissable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h
diff --git a/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h b/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h
index f5d9172679891d24d3984edf4b6e39b34f7a9da0..36ff7db1177532b10786341900df29872ae984fa 100644
--- a/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h
+++ b/components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h
@@ -31,15 +31,30 @@ void UpdateBookmarkOnURLVisitedInMainFrame(
// this info, it returns it creation date.
base::Time GetLastVisitDateForBookmark(const bookmarks::BookmarkNode* node);
-// Returns the list of most recently visited bookmarks. For each bookmarked URL,
-// it returns the most recently created bookmark. The result is ordered by visit
-// time (the most recent first). Only bookmarks visited after
-// |min_visit_time| are considered, at most |max_count| bookmarks are returned.
+// Marks all bookmarks with the given URL as dismissed.
+void MarkBookmarksDismissed(bookmarks::BookmarkModel* bookmark_model,
+ const GURL& url);
+
+// Gets the dismissed flag for a given bookmark |node|. Defaults to false.
+bool IsDismissedFromNTPForBookmark(const bookmarks::BookmarkNode* node);
+
+// Removes the dismissed flag from all bookmarks (only for debugging).
+void MarkAllBookmarksUndismissed(bookmarks::BookmarkModel* bookmark_model);
+
+// Returns the list of most recently visited, non-dismissed bookmarks.
+// For each bookmarked URL, it returns the most recently created bookmark.
+// The result is ordered by visit time (the most recent first). Only bookmarks
+// visited after |min_visit_time| are considered, at most |max_count| bookmarks
+// are returned.
std::vector<const bookmarks::BookmarkNode*> GetRecentlyVisitedBookmarks(
bookmarks::BookmarkModel* bookmark_model,
int max_count,
const base::Time& min_visit_time);
+// Returns the list of all dismissed bookmarks. Only used for debugging.
+std::vector<const bookmarks::BookmarkNode*> GetDismissedBookmarksForDebugging(
+ bookmarks::BookmarkModel* bookmark_model);
+
} // namespace ntp_snippets
#endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_
« no previous file with comments | « no previous file | components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698