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

Side by Side Diff: components/user_prefs/tracked/pref_service_hash_store_contents.cc

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698