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 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" | 5 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 MarkBookmarksDismissed(bookmark_model_, url); | 146 MarkBookmarksDismissed(bookmark_model_, url); |
147 } | 147 } |
148 | 148 |
149 void BookmarkSuggestionsProvider::FetchSuggestionImage( | 149 void BookmarkSuggestionsProvider::FetchSuggestionImage( |
150 const ContentSuggestion::ID& suggestion_id, | 150 const ContentSuggestion::ID& suggestion_id, |
151 const ImageFetchedCallback& callback) { | 151 const ImageFetchedCallback& callback) { |
152 base::ThreadTaskRunnerHandle::Get()->PostTask( | 152 base::ThreadTaskRunnerHandle::Get()->PostTask( |
153 FROM_HERE, base::Bind(callback, gfx::Image())); | 153 FROM_HERE, base::Bind(callback, gfx::Image())); |
154 } | 154 } |
155 | 155 |
| 156 void BookmarkSuggestionsProvider::Fetch( |
| 157 const Category& category, |
| 158 const std::set<std::string>& known_suggestion_ids, |
| 159 FetchingCallback callback) { |
| 160 NOTREACHED(); |
| 161 } |
| 162 |
156 void BookmarkSuggestionsProvider::ClearHistory( | 163 void BookmarkSuggestionsProvider::ClearHistory( |
157 base::Time begin, | 164 base::Time begin, |
158 base::Time end, | 165 base::Time end, |
159 const base::Callback<bool(const GURL& url)>& filter) { | 166 const base::Callback<bool(const GURL& url)>& filter) { |
160 // TODO(vitaliii): Do not remove all dates, but only the ones matched by the | 167 // TODO(vitaliii): Do not remove all dates, but only the ones matched by the |
161 // time range and the filter. | 168 // time range and the filter. |
162 RemoveAllLastVisitDates(bookmark_model_); | 169 RemoveAllLastVisitDates(bookmark_model_); |
163 ClearDismissedSuggestionsForDebugging(provided_category_); | 170 ClearDismissedSuggestionsForDebugging(provided_category_); |
164 FetchBookmarks(); | 171 FetchBookmarks(); |
165 // Temporarily enter an "explicitly disabled" state, so that any open UIs | 172 // Temporarily enter an "explicitly disabled" state, so that any open UIs |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 311 |
305 void BookmarkSuggestionsProvider::NotifyStatusChanged( | 312 void BookmarkSuggestionsProvider::NotifyStatusChanged( |
306 CategoryStatus new_status) { | 313 CategoryStatus new_status) { |
307 if (category_status_ == new_status) | 314 if (category_status_ == new_status) |
308 return; | 315 return; |
309 category_status_ = new_status; | 316 category_status_ = new_status; |
310 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 317 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
311 } | 318 } |
312 | 319 |
313 } // namespace ntp_snippets | 320 } // namespace ntp_snippets |
OLD | NEW |