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

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

Issue 2634403002: Use GetDeterministicMachineSpecificId instead of RLZ for device_id (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/prefs/profile_pref_store_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_command_line_pref_store.h> 5 #include <chrome/browser/prefs/chrome_command_line_pref_store.h>
6 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 6 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 if (error != PersistentPrefStore::PREF_READ_ERROR_NONE && 373 if (error != PersistentPrefStore::PREF_READ_ERROR_NONE &&
374 error != PersistentPrefStore::PREF_READ_ERROR_NO_FILE) { 374 error != PersistentPrefStore::PREF_READ_ERROR_NO_FILE) {
375 LOG(ERROR) << "An error happened during prefs loading: " << error; 375 LOG(ERROR) << "An error happened during prefs loading: " << error;
376 } 376 }
377 #endif 377 #endif
378 } 378 }
379 } 379 }
380 380
381 std::unique_ptr<ProfilePrefStoreManager> CreateProfilePrefStoreManager( 381 std::unique_ptr<ProfilePrefStoreManager> CreateProfilePrefStoreManager(
382 const base::FilePath& profile_path) { 382 const base::FilePath& profile_path) {
383 std::string device_id; 383 std::string legacy_device_id;
384 #if defined(OS_WIN) && BUILDFLAG(ENABLE_RLZ) 384 #if defined(OS_WIN) && BUILDFLAG(ENABLE_RLZ)
385 // This is used by 385 // This is used by
386 // chrome/browser/extensions/api/music_manager_private/device_id_win.cc 386 // chrome/browser/extensions/api/music_manager_private/device_id_win.cc
387 // but that API is private (http://crbug.com/276485) and other platforms are 387 // but that API is private (http://crbug.com/276485) and other platforms are
388 // not available synchronously. 388 // not available synchronously.
389 // As part of improving pref metrics on other platforms we may want to find 389 // As part of improving pref metrics on other platforms we may want to find
390 // ways to defer preference loading until the device ID can be used. 390 // ways to defer preference loading until the device ID can be used.
391 rlz_lib::GetMachineId(&device_id); 391 rlz_lib::GetMachineId(&legacy_device_id);
392 #endif 392 #endif
393 std::string seed; 393 std::string seed;
394 #if defined(GOOGLE_CHROME_BUILD) 394 #if defined(GOOGLE_CHROME_BUILD)
395 seed = ResourceBundle::GetSharedInstance().GetRawDataResource( 395 seed = ResourceBundle::GetSharedInstance().GetRawDataResource(
396 IDR_PREF_HASH_SEED_BIN).as_string(); 396 IDR_PREF_HASH_SEED_BIN).as_string();
397 #endif 397 #endif
398 return base::MakeUnique<ProfilePrefStoreManager>( 398 return base::MakeUnique<ProfilePrefStoreManager>(
399 profile_path, GetTrackingConfiguration(), kTrackedPrefsReportingIDsCount, 399 profile_path, GetTrackingConfiguration(), kTrackedPrefsReportingIDsCount,
400 seed, device_id, g_browser_process->local_state()); 400 seed, legacy_device_id, g_browser_process->local_state());
401 } 401 }
402 402
403 void PrepareFactory(sync_preferences::PrefServiceSyncableFactory* factory, 403 void PrepareFactory(sync_preferences::PrefServiceSyncableFactory* factory,
404 const base::FilePath& pref_filename, 404 const base::FilePath& pref_filename,
405 policy::PolicyService* policy_service, 405 policy::PolicyService* policy_service,
406 SupervisedUserSettingsService* supervised_user_settings, 406 SupervisedUserSettingsService* supervised_user_settings,
407 scoped_refptr<PersistentPrefStore> user_pref_store, 407 scoped_refptr<PersistentPrefStore> user_pref_store,
408 const scoped_refptr<PrefStore>& extension_prefs, 408 const scoped_refptr<PrefStore>& extension_prefs,
409 bool async) { 409 bool async) {
410 policy::BrowserPolicyConnector* policy_connector = 410 policy::BrowserPolicyConnector* policy_connector =
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 void ClearResetTime(Profile* profile) { 522 void ClearResetTime(Profile* profile) {
523 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); 523 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs());
524 } 524 }
525 525
526 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 526 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
527 ProfilePrefStoreManager::RegisterProfilePrefs(registry); 527 ProfilePrefStoreManager::RegisterProfilePrefs(registry);
528 } 528 }
529 529
530 } // namespace chrome_prefs 530 } // namespace chrome_prefs
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/profile_pref_store_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698