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_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_SUGGESTIONS_PROVIDER_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_SUGGESTIONS_PROVIDER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void BookmarkNodeFaviconChanged( | 84 void BookmarkNodeFaviconChanged( |
85 bookmarks::BookmarkModel* model, | 85 bookmarks::BookmarkModel* model, |
86 const bookmarks::BookmarkNode* node) override {} | 86 const bookmarks::BookmarkNode* node) override {} |
87 void BookmarkNodeChildrenReordered( | 87 void BookmarkNodeChildrenReordered( |
88 bookmarks::BookmarkModel* model, | 88 bookmarks::BookmarkModel* model, |
89 const bookmarks::BookmarkNode* node) override {} | 89 const bookmarks::BookmarkNode* node) override {} |
90 void BookmarkAllUserNodesRemoved( | 90 void BookmarkAllUserNodesRemoved( |
91 bookmarks::BookmarkModel* model, | 91 bookmarks::BookmarkModel* model, |
92 const std::set<GURL>& removed_urls) override {} | 92 const std::set<GURL>& removed_urls) override {} |
93 | 93 |
94 void ConvertBookmark(const bookmarks::BookmarkNode* bookmark, | 94 void ConvertBookmark(const bookmarks::BookmarkNode& bookmark, |
95 std::vector<ContentSuggestion>* suggestions); | 95 std::vector<ContentSuggestion>* suggestions); |
96 | 96 |
97 // The actual method to fetch bookmarks - follows each call to FetchBookmarks | 97 // The actual method to fetch bookmarks - follows each call to FetchBookmarks |
98 // but not sooner than the BookmarkModel gets loaded. | 98 // but not sooner than the BookmarkModel gets loaded. |
99 void FetchBookmarksInternal(); | 99 void FetchBookmarksInternal(); |
100 | 100 |
101 // Queries the BookmarkModel for recently visited bookmarks and pushes the | 101 // Queries the BookmarkModel for recently visited bookmarks and pushes the |
102 // results to the ContentSuggestionService. The actual fetching does not | 102 // results to the ContentSuggestionService. The actual fetching does not |
103 // happen before the Bookmark model gets loaded. | 103 // happen before the Bookmark model gets loaded. |
104 void FetchBookmarks(); | 104 void FetchBookmarks(); |
(...skipping 18 matching lines...) Expand all Loading... |
123 // deciding which bookmarks to suggest. Should we also consider visits on | 123 // deciding which bookmarks to suggest. Should we also consider visits on |
124 // desktop platforms? | 124 // desktop platforms? |
125 bool consider_bookmark_visits_from_desktop_; | 125 bool consider_bookmark_visits_from_desktop_; |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(BookmarkSuggestionsProvider); | 127 DISALLOW_COPY_AND_ASSIGN(BookmarkSuggestionsProvider); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace ntp_snippets | 130 } // namespace ntp_snippets |
131 | 131 |
132 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_SUGGESTIONS_PROVIDER_H_ | 132 #endif // COMPONENTS_NTP_SNIPPETS_BOOKMARKS_BOOKMARK_SUGGESTIONS_PROVIDER_H_ |
OLD | NEW |