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

Unified Diff: chrome/browser/chromeos/platform_keys/key_permissions.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: chrome/browser/chromeos/platform_keys/key_permissions.cc
diff --git a/chrome/browser/chromeos/platform_keys/key_permissions.cc b/chrome/browser/chromeos/platform_keys/key_permissions.cc
index 4957a74d2761c9e0dea7a331514fe70d97532a0e..e02671d6522553d070024df53c3420a4d57401de 100644
--- a/chrome/browser/chromeos/platform_keys/key_permissions.cc
+++ b/chrome/browser/chromeos/platform_keys/key_permissions.cc
@@ -247,15 +247,20 @@
return;
}
for (const auto& entry : *entries) {
+ if (!entry) {
+ LOG(ERROR) << "Found invalid NULL entry in PlatformKeys state store.";
+ continue;
+ }
+
std::string spki_b64;
const base::DictionaryValue* dict_entry = nullptr;
- if (entry.GetAsString(&spki_b64)) {
+ if (entry->GetAsString(&spki_b64)) {
// This handles the case that the store contained a plain list of base64
// and DER-encoded SPKIs from an older version of ChromeOS.
KeyEntry new_entry(spki_b64);
new_entry.sign_once = true;
state_store_entries_.push_back(new_entry);
- } else if (entry.GetAsDictionary(&dict_entry)) {
+ } else if (entry->GetAsDictionary(&dict_entry)) {
dict_entry->GetStringWithoutPathExpansion(kStateStoreSPKI, &spki_b64);
KeyEntry new_entry(spki_b64);
dict_entry->GetBooleanWithoutPathExpansion(kStateStoreSignOnce,
@@ -264,7 +269,7 @@
&new_entry.sign_unlimited);
state_store_entries_.push_back(new_entry);
} else {
- LOG(ERROR) << "Found invalid entry of type " << entry.GetType()
+ LOG(ERROR) << "Found invalid entry of type " << entry->GetType()
<< " in PlatformKeys state store.";
continue;
}

Powered by Google App Engine
This is Rietveld 408576698