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

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

Issue 2746023002: Pref service: enable for user prefs in chrome behind a flag. (Closed)
Patch Set: no, the other pref service Created 3 years, 8 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 (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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_manifest_overlay.json ('k') | chrome/browser/prefs/profile_pref_store_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698