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

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

Issue 2634403002: Use GetDeterministicMachineSpecificId instead of RLZ for device_id (Closed)
Patch Set: Rebase Created 3 years, 11 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #else 56 #else
57 true; 57 true;
58 #endif 58 #endif
59 59
60 ProfilePrefStoreManager::ProfilePrefStoreManager( 60 ProfilePrefStoreManager::ProfilePrefStoreManager(
61 const base::FilePath& profile_path, 61 const base::FilePath& profile_path,
62 const std::vector<PrefHashFilter::TrackedPreferenceMetadata>& 62 const std::vector<PrefHashFilter::TrackedPreferenceMetadata>&
63 tracking_configuration, 63 tracking_configuration,
64 size_t reporting_ids_count, 64 size_t reporting_ids_count,
65 const std::string& seed, 65 const std::string& seed,
66 const std::string& device_id, 66 const std::string& legacy_device_id,
67 PrefService* local_state) 67 PrefService* local_state)
68 : profile_path_(profile_path), 68 : profile_path_(profile_path),
69 tracking_configuration_(tracking_configuration), 69 tracking_configuration_(tracking_configuration),
70 reporting_ids_count_(reporting_ids_count), 70 reporting_ids_count_(reporting_ids_count),
71 seed_(seed), 71 seed_(seed),
72 device_id_(device_id), 72 legacy_device_id_(legacy_device_id),
73 local_state_(local_state) {} 73 local_state_(local_state) {}
74 74
75 ProfilePrefStoreManager::~ProfilePrefStoreManager() {} 75 ProfilePrefStoreManager::~ProfilePrefStoreManager() {}
76 76
77 // static 77 // static
78 void ProfilePrefStoreManager::RegisterProfilePrefs( 78 void ProfilePrefStoreManager::RegisterProfilePrefs(
79 user_prefs::PrefRegistrySyncable* registry) { 79 user_prefs::PrefRegistrySyncable* registry) {
80 PrefHashFilter::RegisterProfilePrefs(registry); 80 PrefHashFilter::RegisterProfilePrefs(registry);
81 } 81 }
82 82
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 UMA_HISTOGRAM_BOOLEAN("Settings.InitializedFromMasterPrefs", success); 204 UMA_HISTOGRAM_BOOLEAN("Settings.InitializedFromMasterPrefs", success);
205 return success; 205 return success;
206 } 206 }
207 207
208 std::unique_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore( 208 std::unique_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore(
209 bool use_super_mac) { 209 bool use_super_mac) {
210 DCHECK(kPlatformSupportsPreferenceTracking); 210 DCHECK(kPlatformSupportsPreferenceTracking);
211 211
212 return std::unique_ptr<PrefHashStore>( 212 return std::unique_ptr<PrefHashStore>(
213 new PrefHashStoreImpl(seed_, device_id_, use_super_mac)); 213 new PrefHashStoreImpl(seed_, legacy_device_id_, use_super_mac));
214 } 214 }
215 215
216 std::pair<std::unique_ptr<PrefHashStore>, std::unique_ptr<HashStoreContents>> 216 std::pair<std::unique_ptr<PrefHashStore>, std::unique_ptr<HashStoreContents>>
217 ProfilePrefStoreManager::GetExternalVerificationPrefHashStorePair() { 217 ProfilePrefStoreManager::GetExternalVerificationPrefHashStorePair() {
218 DCHECK(kPlatformSupportsPreferenceTracking); 218 DCHECK(kPlatformSupportsPreferenceTracking);
219 #if defined(OS_WIN) 219 #if defined(OS_WIN)
220 return std::make_pair( 220 return std::make_pair(
221 base::MakeUnique<PrefHashStoreImpl>( 221 base::MakeUnique<PrefHashStoreImpl>(
222 "ChromeRegistryHashStoreValidationSeed", device_id_, 222 "ChromeRegistryHashStoreValidationSeed", legacy_device_id_,
223 false /* use_super_mac */), 223 false /* use_super_mac */),
224 g_preference_validation_registry_path_for_testing 224 g_preference_validation_registry_path_for_testing
225 ? base::MakeUnique<RegistryHashStoreContentsWin>( 225 ? base::MakeUnique<RegistryHashStoreContentsWin>(
226 *g_preference_validation_registry_path_for_testing, 226 *g_preference_validation_registry_path_for_testing,
227 profile_path_.BaseName().LossyDisplayName()) 227 profile_path_.BaseName().LossyDisplayName())
228 : base::MakeUnique<RegistryHashStoreContentsWin>( 228 : base::MakeUnique<RegistryHashStoreContentsWin>(
229 BrowserDistribution::GetDistribution()->GetRegistryPath(), 229 BrowserDistribution::GetDistribution()->GetRegistryPath(),
230 profile_path_.BaseName().LossyDisplayName())); 230 profile_path_.BaseName().LossyDisplayName()));
231 #else 231 #else
232 return std::make_pair(nullptr, nullptr); 232 return std::make_pair(nullptr, nullptr);
233 #endif 233 #endif
234 } 234 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager.h ('k') | components/user_prefs/tracked/pref_hash_calculator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698