| 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, gfx::Image())); | 184 FROM_HERE, base::Bind(callback, gfx::Image())); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void BookmarkSuggestionsProvider::ClearHistory( |
| 188 base::Time begin, |
| 189 base::Time end, |
| 190 const base::Callback<bool(const GURL& url)>& filter) { |
| 191 // TODO(vitaliii): Implement. See crbug.com/641321. |
| 192 } |
| 193 |
| 187 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) { | 194 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) { |
| 188 DCHECK_EQ(category, provided_category_); | 195 DCHECK_EQ(category, provided_category_); |
| 189 // Ignored. | 196 // Ignored. |
| 190 } | 197 } |
| 191 | 198 |
| 192 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging( | 199 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging( |
| 193 Category category, | 200 Category category, |
| 194 const DismissedSuggestionsCallback& callback) { | 201 const DismissedSuggestionsCallback& callback) { |
| 195 DCHECK_EQ(category, provided_category_); | 202 DCHECK_EQ(category, provided_category_); |
| 196 std::vector<const BookmarkNode*> bookmarks = | 203 std::vector<const BookmarkNode*> bookmarks = |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 310 |
| 304 void BookmarkSuggestionsProvider::NotifyStatusChanged( | 311 void BookmarkSuggestionsProvider::NotifyStatusChanged( |
| 305 CategoryStatus new_status) { | 312 CategoryStatus new_status) { |
| 306 if (category_status_ == new_status) | 313 if (category_status_ == new_status) |
| 307 return; | 314 return; |
| 308 category_status_ = new_status; | 315 category_status_ = new_status; |
| 309 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 316 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
| 310 } | 317 } |
| 311 | 318 |
| 312 } // namespace ntp_snippets | 319 } // namespace ntp_snippets |
| OLD | NEW |