| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/platform_keys/key_permissions.h" | 5 #include "chrome/browser/chromeos/platform_keys/key_permissions.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/policy/core/common/policy_map.h" | 16 #include "components/policy/core/common/policy_map.h" |
| 17 #include "components/policy/core/common/policy_namespace.h" | 17 #include "components/policy/core/common/policy_namespace.h" |
| 18 #include "components/policy/core/common/policy_service.h" | 18 #include "components/policy/core/common/policy_service.h" |
| 19 #include "components/policy/policy_constants.h" |
| 19 #include "components/pref_registry/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.h" |
| 20 #include "components/prefs/pref_service.h" | 21 #include "components/prefs/pref_service.h" |
| 21 #include "components/prefs/scoped_user_pref_update.h" | 22 #include "components/prefs/scoped_user_pref_update.h" |
| 22 #include "extensions/browser/state_store.h" | 23 #include "extensions/browser/state_store.h" |
| 23 #include "policy/policy_constants.h" | |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // The key at which platform key specific data is stored in each extension's | 29 // The key at which platform key specific data is stored in each extension's |
| 30 // state store. | 30 // state store. |
| 31 // | 31 // |
| 32 // From older versions of ChromeOS, this key can hold a list of base64 and | 32 // From older versions of ChromeOS, this key can hold a list of base64 and |
| 33 // DER-encoded SPKIs. A key can be used for signing at most once if it is part | 33 // DER-encoded SPKIs. A key can be used for signing at most once if it is part |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 const base::DictionaryValue* platform_keys = | 394 const base::DictionaryValue* platform_keys = |
| 395 profile_prefs_->GetDictionary(prefs::kPlatformKeys); | 395 profile_prefs_->GetDictionary(prefs::kPlatformKeys); |
| 396 | 396 |
| 397 const base::DictionaryValue* key_entry = nullptr; | 397 const base::DictionaryValue* key_entry = nullptr; |
| 398 platform_keys->GetDictionaryWithoutPathExpansion(public_key_spki_der_b64, | 398 platform_keys->GetDictionaryWithoutPathExpansion(public_key_spki_der_b64, |
| 399 &key_entry); | 399 &key_entry); |
| 400 return key_entry; | 400 return key_entry; |
| 401 } | 401 } |
| 402 | 402 |
| 403 } // namespace chromeos | 403 } // namespace chromeos |
| OLD | NEW |