Chromium Code Reviews| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 MarkBookmarksDismissed(bookmark_model_, url); | 177 MarkBookmarksDismissed(bookmark_model_, url); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void BookmarkSuggestionsProvider::FetchSuggestionImage( | 180 void BookmarkSuggestionsProvider::FetchSuggestionImage( |
| 181 const std::string& suggestion_id, | 181 const std::string& suggestion_id, |
| 182 const ImageFetchedCallback& callback) { | 182 const ImageFetchedCallback& callback) { |
| 183 base::ThreadTaskRunnerHandle::Get()->PostTask( | 183 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 184 FROM_HERE, base::Bind(callback, suggestion_id, gfx::Image())); | 184 FROM_HERE, base::Bind(callback, suggestion_id, gfx::Image())); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void BookmarkSuggestionsProvider::ClearHistory() { | |
| 188 // Not implemented. | |
|
Marc Treib
2016/08/29 09:43:11
Add a TODO and reference the bug?
vitaliii
2016/08/29 10:37:25
Done.
| |
| 189 } | |
| 190 | |
| 187 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) { | 191 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) { |
| 188 DCHECK_EQ(category, provided_category_); | 192 DCHECK_EQ(category, provided_category_); |
| 189 // Ignored. | 193 // Ignored. |
| 190 } | 194 } |
| 191 | 195 |
| 192 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging( | 196 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging( |
| 193 Category category, | 197 Category category, |
| 194 const DismissedSuggestionsCallback& callback) { | 198 const DismissedSuggestionsCallback& callback) { |
| 195 DCHECK_EQ(category, provided_category_); | 199 DCHECK_EQ(category, provided_category_); |
| 196 std::vector<const BookmarkNode*> bookmarks = | 200 std::vector<const BookmarkNode*> bookmarks = |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 | 307 |
| 304 void BookmarkSuggestionsProvider::NotifyStatusChanged( | 308 void BookmarkSuggestionsProvider::NotifyStatusChanged( |
| 305 CategoryStatus new_status) { | 309 CategoryStatus new_status) { |
| 306 if (category_status_ == new_status) | 310 if (category_status_ == new_status) |
| 307 return; | 311 return; |
| 308 category_status_ = new_status; | 312 category_status_ = new_status; |
| 309 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 313 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
| 310 } | 314 } |
| 311 | 315 |
| 312 } // namespace ntp_snippets | 316 } // namespace ntp_snippets |
| OLD | NEW |