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

Unified Diff: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc

Issue 2377663002: [NTP Snippets] Introduce ContentSuggestion::ID (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
diff --git a/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc b/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
index 22dd7ede33d31beaee5f367659786e8f54f46c57..b87f20ed039dd8b6f1ccc0fd813e5b23e660280d 100644
--- a/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
+++ b/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
@@ -45,9 +45,8 @@ void PhysicalWebPageSuggestionsProvider::OnDisplayableUrlsChanged(
for (const UrlInfo& url_info : urls) {
if (suggestions.size() >= kMaxSuggestionsCount) break;
- ContentSuggestion suggestion(
- MakeUniqueID(provided_category_, url_info.site_url.spec()),
- url_info.site_url);
+ ContentSuggestion suggestion(provided_category_, url_info.site_url.spec(),
+ url_info.site_url);
suggestion.set_title(base::UTF8ToUTF16(url_info.title));
suggestion.set_snippet_text(base::UTF8ToUTF16(url_info.description));
@@ -75,13 +74,14 @@ CategoryInfo PhysicalWebPageSuggestionsProvider::GetCategoryInfo(
}
void PhysicalWebPageSuggestionsProvider::DismissSuggestion(
- const std::string& suggestion_id) {
+ const ContentSuggestion::ID& suggestion_id) {
// TODO(vitaliii): Implement this and then
// ClearDismissedSuggestionsForDebugging.
}
void PhysicalWebPageSuggestionsProvider::FetchSuggestionImage(
- const std::string& suggestion_id, const ImageFetchedCallback& callback) {
+ const ContentSuggestion::ID& suggestion_id,
+ const ImageFetchedCallback& callback) {
// TODO(vitaliii): Implement.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(callback, gfx::Image()));

Powered by Google App Engine
This is Rietveld 408576698