OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/prefs/tracked/pref_service_hash_store_contents.h" | 5 #include "components/user_prefs/tracked/pref_service_hash_store_contents.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Implements get-or-create of a dictionary value and holds a | 14 // Implements get-or-create of a dictionary value and holds a |
15 // DictionaryPrefUpdate. | 15 // DictionaryPrefUpdate. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 hash_of_hashes_dict->GetStringWithoutPathExpansion(hash_store_id_, | 137 hash_of_hashes_dict->GetStringWithoutPathExpansion(hash_store_id_, |
138 &hash_of_hashes); | 138 &hash_of_hashes); |
139 } | 139 } |
140 return hash_of_hashes; | 140 return hash_of_hashes; |
141 } | 141 } |
142 | 142 |
143 void PrefServiceHashStoreContents::SetSuperMac(const std::string& super_mac) { | 143 void PrefServiceHashStoreContents::SetSuperMac(const std::string& super_mac) { |
144 PrefServiceMutableDictionary(kHashOfHashesDict, pref_service_) | 144 PrefServiceMutableDictionary(kHashOfHashesDict, pref_service_) |
145 ->SetStringWithoutPathExpansion(hash_store_id_, super_mac); | 145 ->SetStringWithoutPathExpansion(hash_store_id_, super_mac); |
146 } | 146 } |
OLD | NEW |