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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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/content_suggestions_service.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index 48098c7afe3b63466064f45a9af81c2f4253790a..d48636ee07a6f0802fa808523e4e26a7bbb84a5c 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -494,10 +494,10 @@ void ContentSuggestionsService::RestoreDismissedCategoriesFromPrefs() {
const base::ListValue* list =
pref_service_->GetList(prefs::kDismissedCategories);
- for (const std::unique_ptr<base::Value>& entry : *list) {
+ for (const base::Value& entry : *list) {
int id = 0;
- if (!entry->GetAsInteger(&id)) {
- DLOG(WARNING) << "Invalid category pref value: " << *entry;
+ if (!entry.GetAsInteger(&id)) {
+ DLOG(WARNING) << "Invalid category pref value: " << entry;
continue;
}

Powered by Google App Engine
This is Rietveld 408576698