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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.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: chrome/browser/ui/webui/snippets_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
index 761bad9674211e3f3b2e68e8a39aa98de73725fa..55030f85ebc0669c264085a062075ac85871653c 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -41,7 +41,7 @@ std::unique_ptr<base::DictionaryValue> PrepareSuggestion(
const ContentSuggestion& suggestion,
int index) {
auto entry = base::MakeUnique<base::DictionaryValue>();
- entry->SetString("suggestionId", suggestion.id());
+ entry->SetString("idWithinCategory", suggestion.id().id_within_category());
entry->SetString("url", suggestion.url().spec());
entry->SetString("ampUrl", suggestion.amp_url().spec());
entry->SetString("title", suggestion.title());
@@ -144,8 +144,7 @@ void SnippetsInternalsMessageHandler::OnCategoryStatusChanged(
}
void SnippetsInternalsMessageHandler::OnSuggestionInvalidated(
- ntp_snippets::Category category,
- const std::string& suggestion_id) {
+ const ntp_snippets::ContentSuggestion::ID& suggestion_id) {
if (!dom_loaded_)
return;
SendContentSuggestions();

Powered by Google App Engine
This is Rietveld 408576698