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

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

Issue 266553002: Add TrackedPreferenceValidationDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 6 years, 7 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 | Annotate | Revision Log
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_pref_service_factory.h" 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 #include "base/prefs/pref_value_store.h" 24 #include "base/prefs/pref_value_store.h"
25 #include "base/threading/sequenced_worker_pool.h" 25 #include "base/threading/sequenced_worker_pool.h"
26 #include "base/time/time.h" 26 #include "base/time/time.h"
27 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/prefs/command_line_pref_store.h" 28 #include "chrome/browser/prefs/command_line_pref_store.h"
29 #include "chrome/browser/prefs/pref_hash_filter.h" 29 #include "chrome/browser/prefs/pref_hash_filter.h"
30 #include "chrome/browser/prefs/pref_model_associator.h" 30 #include "chrome/browser/prefs/pref_model_associator.h"
31 #include "chrome/browser/prefs/pref_service_syncable.h" 31 #include "chrome/browser/prefs/pref_service_syncable.h"
32 #include "chrome/browser/prefs/pref_service_syncable_factory.h" 32 #include "chrome/browser/prefs/pref_service_syncable_factory.h"
33 #include "chrome/browser/prefs/profile_pref_store_manager.h" 33 #include "chrome/browser/prefs/profile_pref_store_manager.h"
34 #include "chrome/browser/prefs/tracked/tracked_preference_validation_observer.h"
34 #include "chrome/browser/profiles/file_path_verifier_win.h" 35 #include "chrome/browser/profiles/file_path_verifier_win.h"
35 #include "chrome/browser/profiles/profile_info_cache.h" 36 #include "chrome/browser/profiles/profile_info_cache.h"
36 #include "chrome/browser/profiles/profile_manager.h" 37 #include "chrome/browser/profiles/profile_manager.h"
37 #include "chrome/browser/search_engines/default_search_manager.h" 38 #include "chrome/browser/search_engines/default_search_manager.h"
38 #include "chrome/browser/search_engines/default_search_pref_migration.h" 39 #include "chrome/browser/search_engines/default_search_pref_migration.h"
39 #include "chrome/browser/ui/profile_error_dialog.h" 40 #include "chrome/browser/ui/profile_error_dialog.h"
40 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
41 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
42 #include "components/user_prefs/pref_registry_syncable.h" 43 #include "components/user_prefs/pref_registry_syncable.h"
43 #include "content/public/browser/browser_context.h" 44 #include "content/public/browser/browser_context.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 scoped_ptr<PrefServiceSyncable> CreateProfilePrefs( 450 scoped_ptr<PrefServiceSyncable> CreateProfilePrefs(
450 const base::FilePath& profile_path, 451 const base::FilePath& profile_path,
451 base::SequencedTaskRunner* pref_io_task_runner, 452 base::SequencedTaskRunner* pref_io_task_runner,
452 policy::PolicyService* policy_service, 453 policy::PolicyService* policy_service,
453 ManagedUserSettingsService* managed_user_settings, 454 ManagedUserSettingsService* managed_user_settings,
454 const scoped_refptr<PrefStore>& extension_prefs, 455 const scoped_refptr<PrefStore>& extension_prefs,
455 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, 456 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
456 bool async) { 457 bool async) {
457 TRACE_EVENT0("browser", "chrome_prefs::CreateProfilePrefs"); 458 TRACE_EVENT0("browser", "chrome_prefs::CreateProfilePrefs");
458 PrefServiceSyncableFactory factory; 459 PrefServiceSyncableFactory factory;
459 PrepareFactory(&factory, 460 PrepareFactory(
460 policy_service, 461 &factory,
461 managed_user_settings, 462 policy_service,
462 scoped_refptr<PersistentPrefStore>( 463 managed_user_settings,
463 CreateProfilePrefStoreManager(profile_path) 464 scoped_refptr<PersistentPrefStore>(
464 ->CreateProfilePrefStore(pref_io_task_runner)), 465 CreateProfilePrefStoreManager(profile_path)->CreateProfilePrefStore(
465 extension_prefs, 466 pref_io_task_runner,
466 async); 467 scoped_ptr<TrackedPreferenceValidationObserver>())),
468 extension_prefs,
469 async);
467 scoped_ptr<PrefServiceSyncable> pref_service = 470 scoped_ptr<PrefServiceSyncable> pref_service =
468 factory.CreateSyncable(pref_registry.get()); 471 factory.CreateSyncable(pref_registry.get());
469 472
470 ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service.get()); 473 ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service.get());
471 474
472 return pref_service.Pass(); 475 return pref_service.Pass();
473 } 476 }
474 477
475 void SchedulePrefsFilePathVerification(const base::FilePath& profile_path) { 478 void SchedulePrefsFilePathVerification(const base::FilePath& profile_path) {
476 #if defined(OS_WIN) 479 #if defined(OS_WIN)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 537
535 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 538 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
536 ProfilePrefStoreManager::RegisterProfilePrefs(registry); 539 ProfilePrefStoreManager::RegisterProfilePrefs(registry);
537 } 540 }
538 541
539 void RegisterPrefs(PrefRegistrySimple* registry) { 542 void RegisterPrefs(PrefRegistrySimple* registry) {
540 ProfilePrefStoreManager::RegisterPrefs(registry); 543 ProfilePrefStoreManager::RegisterPrefs(registry);
541 } 544 }
542 545
543 } // namespace chrome_prefs 546 } // namespace chrome_prefs
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/mock_validation_observer.h » ('j') | chrome/browser/prefs/mock_validation_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698