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

Unified Diff: chrome/browser/chromeos/platform_keys/key_permissions.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Rebase 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 e02671d6522553d070024df53c3420a4d57401de..4957a74d2761c9e0dea7a331514fe70d97532a0e 100644
--- a/chrome/browser/chromeos/platform_keys/key_permissions.cc
+++ b/chrome/browser/chromeos/platform_keys/key_permissions.cc
@@ -247,20 +247,15 @@ void KeyPermissions::PermissionsForExtension::KeyEntriesFromState(
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,
@@ -269,7 +264,7 @@ void KeyPermissions::PermissionsForExtension::KeyEntriesFromState(
&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