OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 "components/user_prefs/tracked/dictionary_hash_store_contents.h" | 5 #include "components/user_prefs/tracked/dictionary_hash_store_contents.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/prefs/persistent_pref_store.h" | |
11 #include "base/values.h" | 10 #include "base/values.h" |
12 #include "components/pref_registry/pref_registry_syncable.h" | 11 #include "components/pref_registry/pref_registry_syncable.h" |
| 12 #include "components/prefs/persistent_pref_store.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 const char kPreferenceMACs[] = "protection.macs"; | 16 const char kPreferenceMACs[] = "protection.macs"; |
17 const char kSuperMACPref[] = "protection.super_mac"; | 17 const char kSuperMACPref[] = "protection.super_mac"; |
18 | 18 |
19 class MutablePreferenceMacDictionary | 19 class MutablePreferenceMacDictionary |
20 : public HashStoreContents::MutableDictionary { | 20 : public HashStoreContents::MutableDictionary { |
21 public: | 21 public: |
22 explicit MutablePreferenceMacDictionary(base::DictionaryValue* storage); | 22 explicit MutablePreferenceMacDictionary(base::DictionaryValue* storage); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 std::string DictionaryHashStoreContents::GetSuperMac() const { | 87 std::string DictionaryHashStoreContents::GetSuperMac() const { |
88 std::string super_mac_string; | 88 std::string super_mac_string; |
89 storage_->GetString(kSuperMACPref, &super_mac_string); | 89 storage_->GetString(kSuperMACPref, &super_mac_string); |
90 return super_mac_string; | 90 return super_mac_string; |
91 } | 91 } |
92 | 92 |
93 void DictionaryHashStoreContents::SetSuperMac(const std::string& super_mac) { | 93 void DictionaryHashStoreContents::SetSuperMac(const std::string& super_mac) { |
94 storage_->SetString(kSuperMACPref, super_mac); | 94 storage_->SetString(kSuperMACPref, super_mac); |
95 } | 95 } |
OLD | NEW |