Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Side by Side Diff: components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc

Issue 2280543003: Remove snippet_id from ImageFetchedCallback (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const std::string& suggestion_id) { 158 const std::string& suggestion_id) {
159 DCHECK(bookmark_model_->loaded()); 159 DCHECK(bookmark_model_->loaded());
160 GURL url(GetWithinCategoryIDFromUniqueID(suggestion_id)); 160 GURL url(GetWithinCategoryIDFromUniqueID(suggestion_id));
161 MarkBookmarksDismissed(bookmark_model_, url); 161 MarkBookmarksDismissed(bookmark_model_, url);
162 } 162 }
163 163
164 void BookmarkSuggestionsProvider::FetchSuggestionImage( 164 void BookmarkSuggestionsProvider::FetchSuggestionImage(
165 const std::string& suggestion_id, 165 const std::string& suggestion_id,
166 const ImageFetchedCallback& callback) { 166 const ImageFetchedCallback& callback) {
167 base::ThreadTaskRunnerHandle::Get()->PostTask( 167 base::ThreadTaskRunnerHandle::Get()->PostTask(
168 FROM_HERE, base::Bind(callback, suggestion_id, gfx::Image())); 168 FROM_HERE, base::Bind(callback, gfx::Image()));
169 } 169 }
170 170
171 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) { 171 void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) {
172 DCHECK_EQ(category, provided_category_); 172 DCHECK_EQ(category, provided_category_);
173 // Ignored. 173 // Ignored.
174 } 174 }
175 175
176 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging( 176 void BookmarkSuggestionsProvider::GetDismissedSuggestionsForDebugging(
177 Category category, 177 Category category,
178 const DismissedSuggestionsCallback& callback) { 178 const DismissedSuggestionsCallback& callback) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 void BookmarkSuggestionsProvider::NotifyStatusChanged( 288 void BookmarkSuggestionsProvider::NotifyStatusChanged(
289 CategoryStatus new_status) { 289 CategoryStatus new_status) {
290 if (category_status_ == new_status) 290 if (category_status_ == new_status)
291 return; 291 return;
292 category_status_ = new_status; 292 category_status_ = new_status;
293 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); 293 observer()->OnCategoryStatusChanged(this, provided_category_, new_status);
294 } 294 }
295 295
296 } // namespace ntp_snippets 296 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | components/ntp_snippets/content_suggestions_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698