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_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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // the re-instantiated server value. Starting sync ASAP minimizes the window | 440 // the re-instantiated server value. Starting sync ASAP minimizes the window |
441 // before the server value is re-instantiated (this window can otherwise be | 441 // before the server value is re-instantiated (this window can otherwise be |
442 // as long as 10 seconds by default). | 442 // as long as 10 seconds by default). |
443 const base::Closure start_sync_flare_for_prefs = | 443 const base::Closure start_sync_flare_for_prefs = |
444 base::Bind(sync_start_util::GetFlareForSyncableService(profile_path), | 444 base::Bind(sync_start_util::GetFlareForSyncableService(profile_path), |
445 syncer::PREFERENCES); | 445 syncer::PREFERENCES); |
446 | 446 |
447 sync_preferences::PrefServiceSyncableFactory factory; | 447 sync_preferences::PrefServiceSyncableFactory factory; |
448 scoped_refptr<PersistentPrefStore> user_pref_store( | 448 scoped_refptr<PersistentPrefStore> user_pref_store( |
449 CreateProfilePrefStoreManager(profile_path) | 449 CreateProfilePrefStoreManager(profile_path) |
450 ->CreateProfilePrefStore(pref_io_task_runner, | 450 ->CreateProfilePrefStore( |
451 start_sync_flare_for_prefs, | 451 pref_io_task_runner, start_sync_flare_for_prefs, |
452 validation_delegate)); | 452 validation_delegate, connector, pref_registry)); |
453 PrepareFactory(&factory, profile_path, policy_service, | 453 PrepareFactory(&factory, profile_path, policy_service, |
454 supervised_user_settings, user_pref_store, extension_prefs, | 454 supervised_user_settings, user_pref_store, extension_prefs, |
455 async); | 455 async); |
456 std::unique_ptr<sync_preferences::PrefServiceSyncable> pref_service = | 456 std::unique_ptr<sync_preferences::PrefServiceSyncable> pref_service = |
457 factory.CreateSyncable(pref_registry.get(), connector); | 457 factory.CreateSyncable(pref_registry.get(), connector); |
458 | 458 |
459 return pref_service; | 459 return pref_service; |
460 } | 460 } |
461 | 461 |
462 void DisableDomainCheckForTesting() { | 462 void DisableDomainCheckForTesting() { |
(...skipping 15 matching lines...) Expand all Loading... |
478 | 478 |
479 void ClearResetTime(Profile* profile) { | 479 void ClearResetTime(Profile* profile) { |
480 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); | 480 ProfilePrefStoreManager::ClearResetTime(profile->GetPrefs()); |
481 } | 481 } |
482 | 482 |
483 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 483 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
484 ProfilePrefStoreManager::RegisterProfilePrefs(registry); | 484 ProfilePrefStoreManager::RegisterProfilePrefs(registry); |
485 } | 485 } |
486 | 486 |
487 } // namespace chrome_prefs | 487 } // namespace chrome_prefs |
OLD | NEW |