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

Side by Side Diff: chrome/browser/prefs/profile_pref_store_manager.cc

Issue 2299523003: Add synchronous callback support to important_file_writer.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more re-ordering Created 4 years, 3 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/profile_pref_store_manager.h" 5 #include "chrome/browser/prefs/profile_pref_store_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // file in M40+. 127 // file in M40+.
128 scoped_refptr<JsonPrefStore> protected_pref_store(new JsonPrefStore( 128 scoped_refptr<JsonPrefStore> protected_pref_store(new JsonPrefStore(
129 profile_path_.Append(chrome::kSecurePreferencesFilename), 129 profile_path_.Append(chrome::kSecurePreferencesFilename),
130 profile_path_.Append(chrome::kProtectedPreferencesFilenameDeprecated), 130 profile_path_.Append(chrome::kProtectedPreferencesFilenameDeprecated),
131 io_task_runner.get(), std::move(protected_pref_hash_filter))); 131 io_task_runner.get(), std::move(protected_pref_hash_filter)));
132 132
133 SetupTrackedPreferencesMigration( 133 SetupTrackedPreferencesMigration(
134 unprotected_pref_names, protected_pref_names, 134 unprotected_pref_names, protected_pref_names,
135 base::Bind(&RemoveValueSilently, unprotected_pref_store->AsWeakPtr()), 135 base::Bind(&RemoveValueSilently, unprotected_pref_store->AsWeakPtr()),
136 base::Bind(&RemoveValueSilently, protected_pref_store->AsWeakPtr()), 136 base::Bind(&RemoveValueSilently, protected_pref_store->AsWeakPtr()),
137 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteCallback, 137 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply,
138 unprotected_pref_store->AsWeakPtr()), 138 unprotected_pref_store->AsWeakPtr()),
139 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteCallback, 139 base::Bind(&JsonPrefStore::RegisterOnNextSuccessfulWriteReply,
140 protected_pref_store->AsWeakPtr()), 140 protected_pref_store->AsWeakPtr()),
141 GetPrefHashStore(false), GetPrefHashStore(true), 141 GetPrefHashStore(false), GetPrefHashStore(true),
142 raw_unprotected_pref_hash_filter, raw_protected_pref_hash_filter); 142 raw_unprotected_pref_hash_filter, raw_protected_pref_hash_filter);
143 143
144 return new SegregatedPrefStore(unprotected_pref_store, protected_pref_store, 144 return new SegregatedPrefStore(unprotected_pref_store, protected_pref_store,
145 protected_pref_names); 145 protected_pref_names);
146 } 146 }
147 147
148 bool ProfilePrefStoreManager::InitializePrefsFromMasterPrefs( 148 bool ProfilePrefStoreManager::InitializePrefsFromMasterPrefs(
149 const base::DictionaryValue& master_prefs) { 149 const base::DictionaryValue& master_prefs) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return success; 182 return success;
183 } 183 }
184 184
185 std::unique_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( 185 std::unique_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore(
186 bool use_super_mac) { 186 bool use_super_mac) {
187 DCHECK(kPlatformSupportsPreferenceTracking); 187 DCHECK(kPlatformSupportsPreferenceTracking);
188 188
189 return std::unique_ptr<PrefHashStore>( 189 return std::unique_ptr<PrefHashStore>(
190 new PrefHashStoreImpl(seed_, device_id_, use_super_mac)); 190 new PrefHashStoreImpl(seed_, device_id_, use_super_mac));
191 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698