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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl.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/remote/remote_suggestions_provider_impl.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
index 2763aa4762c4d3848eb37f327fb0474fdd7576d5..af67c654bacc0f45bff56ceb2a7ddea1d97cc5ac 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
@@ -1191,29 +1191,29 @@
const base::ListValue* list =
pref_service_->GetList(prefs::kRemoteSuggestionCategories);
- for (const base::Value& entry : *list) {
+ for (const std::unique_ptr<base::Value>& entry : *list) {
const base::DictionaryValue* dict = nullptr;
- if (!entry.GetAsDictionary(&dict)) {
- DLOG(WARNING) << "Invalid category pref value: " << entry;
+ if (!entry->GetAsDictionary(&dict)) {
+ DLOG(WARNING) << "Invalid category pref value: " << *entry;
continue;
}
int id = 0;
if (!dict->GetInteger(kCategoryContentId, &id)) {
DLOG(WARNING) << "Invalid category pref value, missing '"
- << kCategoryContentId << "': " << entry;
+ << kCategoryContentId << "': " << *entry;
continue;
}
base::string16 title;
if (!dict->GetString(kCategoryContentTitle, &title)) {
DLOG(WARNING) << "Invalid category pref value, missing '"
- << kCategoryContentTitle << "': " << entry;
+ << kCategoryContentTitle << "': " << *entry;
continue;
}
bool included_in_last_server_response = false;
if (!dict->GetBoolean(kCategoryContentProvidedByServer,
&included_in_last_server_response)) {
DLOG(WARNING) << "Invalid category pref value, missing '"
- << kCategoryContentProvidedByServer << "': " << entry;
+ << kCategoryContentProvidedByServer << "': " << *entry;
continue;
}
bool allow_fetching_more_results = false;

Powered by Google App Engine
This is Rietveld 408576698