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

Side by Side Diff: components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h

Issue 2616633002: Respect time range in browsing data removal for last-visited data. (Closed)
Patch Set: rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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
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 // TODO(tschumann): Implement URL filtering.
75 void RemoveLastVisitedDatesBetween(const base::Time& begin,
76 const base::Time& end,
77 base::Callback<bool(const GURL& url)> filter,
78 bookmarks::BookmarkModel* bookmark_model);
72 79
73 } // namespace ntp_snippets 80 } // namespace ntp_snippets
74 81
75 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ 82 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698