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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 9d4955e1e2872eda23d76479904ebb3e65b90805..cb54bbb7174ea315ab0aadb7be7a8bc94160f247 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -606,10 +606,10 @@
const base::ListValue* list =
pref_service_->GetList(prefs::kDismissedCategories);
- for (const base::Value& entry : *list) {
+ for (const std::unique_ptr<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;
}
« no previous file with comments | « components/ntp_snippets/category_rankers/click_based_category_ranker.cc ('k') | components/ntp_snippets/pref_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698