| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 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 | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 
|  | 6 #define COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 
|  | 7 | 
|  | 8 #include <vector> | 
|  | 9 | 
|  | 10 class GURL; | 
|  | 11 | 
|  | 12 namespace base { | 
|  | 13 class Time; | 
|  | 14 }  // namespace base | 
|  | 15 | 
|  | 16 namespace bookmarks { | 
|  | 17 class BookmarkModel; | 
|  | 18 class BookmarkNode; | 
|  | 19 }  // namespace bookmarks | 
|  | 20 | 
|  | 21 namespace ntp_snippets { | 
|  | 22 | 
|  | 23 // If there is a bookmark for |url|, this function updates its last visit date | 
|  | 24 // to now. If there are multiple bookmarks for a given URL, it updates all of | 
|  | 25 // them. | 
|  | 26 void UpdateBookmarkOnURLVisitedInMainFrame( | 
|  | 27     bookmarks::BookmarkModel* bookmark_model, | 
|  | 28     const GURL& url); | 
|  | 29 | 
|  | 30 // Gets the last visit date for a given bookmark |node|. If the bookmark lacks | 
|  | 31 // this info, it returns it creation date. | 
|  | 32 base::Time GetLastVisitDateForBookmark(const bookmarks::BookmarkNode* node); | 
|  | 33 | 
|  | 34 // Returns the list of most recently visited bookmarks. For each bookmarked URL, | 
|  | 35 // it returns the most recently created bookmark. The result is ordered by visit | 
|  | 36 // time (the most recent first). Only bookmarks visited after | 
|  | 37 // |min_visit_time| are considered, at most |max_count| bookmarks are returned. | 
|  | 38 std::vector<const bookmarks::BookmarkNode*> GetRecentlyVisitedBookmarks( | 
|  | 39     bookmarks::BookmarkModel* bookmark_model, | 
|  | 40     int max_count, | 
|  | 41     const base::Time& min_visit_time); | 
|  | 42 | 
|  | 43 }  // namespace ntp_snippets | 
|  | 44 | 
|  | 45 #endif  // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_LAST_VISIT_UTILS_H_ | 
| OLD | NEW | 
|---|