| OLD | NEW |
| 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_pref_service_factory.h" | 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // not available synchronously. | 404 // not available synchronously. |
| 405 // As part of improving pref metrics on other platforms we may want to find | 405 // As part of improving pref metrics on other platforms we may want to find |
| 406 // ways to defer preference loading until the device ID can be used. | 406 // ways to defer preference loading until the device ID can be used. |
| 407 rlz_lib::GetMachineId(&device_id); | 407 rlz_lib::GetMachineId(&device_id); |
| 408 #endif | 408 #endif |
| 409 std::string seed; | 409 std::string seed; |
| 410 #if defined(GOOGLE_CHROME_BUILD) | 410 #if defined(GOOGLE_CHROME_BUILD) |
| 411 seed = ResourceBundle::GetSharedInstance().GetRawDataResource( | 411 seed = ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 412 IDR_PREF_HASH_SEED_BIN).as_string(); | 412 IDR_PREF_HASH_SEED_BIN).as_string(); |
| 413 #endif | 413 #endif |
| 414 return base::WrapUnique(new ProfilePrefStoreManager( | 414 return base::MakeUnique<ProfilePrefStoreManager>( |
| 415 profile_path, GetTrackingConfiguration(), kTrackedPrefsReportingIDsCount, | 415 profile_path, GetTrackingConfiguration(), kTrackedPrefsReportingIDsCount, |
| 416 seed, device_id, g_browser_process->local_state())); | 416 seed, device_id, g_browser_process->local_state()); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void PrepareFactory(syncable_prefs::PrefServiceSyncableFactory* factory, | 419 void PrepareFactory(syncable_prefs::PrefServiceSyncableFactory* factory, |
| 420 const base::FilePath& pref_filename, | 420 const base::FilePath& pref_filename, |
| 421 policy::PolicyService* policy_service, | 421 policy::PolicyService* policy_service, |
| 422 SupervisedUserSettingsService* supervised_user_settings, | 422 SupervisedUserSettingsService* supervised_user_settings, |
| 423 scoped_refptr<PersistentPrefStore> user_pref_store, | 423 scoped_refptr<PersistentPrefStore> user_pref_store, |
| 424 const scoped_refptr<PrefStore>& extension_prefs, | 424 const scoped_refptr<PrefStore>& extension_prefs, |
| 425 bool async) { | 425 bool async) { |
| 426 policy::BrowserPolicyConnector* policy_connector = | 426 policy::BrowserPolicyConnector* policy_connector = |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 539 |
| 540 void ClearResetTime(Profile* profile) { | 540 void ClearResetTime(Profile* profile) { |
| 541 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 541 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 544 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 545 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 545 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace chrome_prefs | 548 } // namespace chrome_prefs |
| OLD | NEW |