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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 void BookmarkSuggestionsProvider::FetchSuggestionImage( | 151 void BookmarkSuggestionsProvider::FetchSuggestionImage( |
152 const ContentSuggestion::ID& suggestion_id, | 152 const ContentSuggestion::ID& suggestion_id, |
153 const ImageFetchedCallback& callback) { | 153 const ImageFetchedCallback& callback) { |
154 base::ThreadTaskRunnerHandle::Get()->PostTask( | 154 base::ThreadTaskRunnerHandle::Get()->PostTask( |
155 FROM_HERE, base::Bind(callback, gfx::Image())); | 155 FROM_HERE, base::Bind(callback, gfx::Image())); |
156 } | 156 } |
157 | 157 |
158 void BookmarkSuggestionsProvider::Fetch( | 158 void BookmarkSuggestionsProvider::Fetch( |
159 const Category& category, | 159 const Category& category, |
160 const std::set<std::string>& known_suggestion_ids, | 160 const std::set<std::string>& known_suggestion_ids, |
161 FetchingCallback callback) { | 161 const FetchingCallback& callback) { |
162 NOTREACHED(); | 162 NOTREACHED(); |
163 base::ThreadTaskRunnerHandle::Get()->PostTask( | 163 base::ThreadTaskRunnerHandle::Get()->PostTask( |
164 FROM_HERE, | 164 FROM_HERE, |
165 base::Bind(callback, base::Passed(std::vector<ContentSuggestion>()))); | 165 base::Bind(callback, base::Passed(std::vector<ContentSuggestion>()))); |
166 } | 166 } |
167 | 167 |
168 void BookmarkSuggestionsProvider::ClearHistory( | 168 void BookmarkSuggestionsProvider::ClearHistory( |
169 base::Time begin, | 169 base::Time begin, |
170 base::Time end, | 170 base::Time end, |
171 const base::Callback<bool(const GURL& url)>& filter) { | 171 const base::Callback<bool(const GURL& url)>& filter) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 void BookmarkSuggestionsProvider::NotifyStatusChanged( | 317 void BookmarkSuggestionsProvider::NotifyStatusChanged( |
318 CategoryStatus new_status) { | 318 CategoryStatus new_status) { |
319 if (category_status_ == new_status) | 319 if (category_status_ == new_status) |
320 return; | 320 return; |
321 category_status_ = new_status; | 321 category_status_ = new_status; |
322 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 322 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
323 } | 323 } |
324 | 324 |
325 } // namespace ntp_snippets | 325 } // namespace ntp_snippets |
OLD | NEW |