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

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

Issue 2635153002: Pref service: expose all read-only PrefStores through Mojo (Closed)
Patch Set: Address review comments Created 3 years, 9 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 #ifndef CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 class FilePath; 14 class FilePath;
15 class SequencedTaskRunner; 15 class SequencedTaskRunner;
16 class Time; 16 class Time;
17 } 17 }
18 18
19 namespace policy { 19 namespace policy {
20 class PolicyService; 20 class PolicyService;
21 } 21 }
22 22
23 namespace service_manager {
24 class Connector;
25 }
26
23 namespace sync_preferences { 27 namespace sync_preferences {
24 class PrefServiceSyncable; 28 class PrefServiceSyncable;
25 } 29 }
26 30
27 namespace user_prefs { 31 namespace user_prefs {
28 class PrefRegistrySyncable; 32 class PrefRegistrySyncable;
29 } 33 }
30 34
31 class PrefRegistry; 35 class PrefRegistry;
32 class PrefService; 36 class PrefService;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool async); 75 bool async);
72 76
73 std::unique_ptr<sync_preferences::PrefServiceSyncable> CreateProfilePrefs( 77 std::unique_ptr<sync_preferences::PrefServiceSyncable> CreateProfilePrefs(
74 const base::FilePath& pref_filename, 78 const base::FilePath& pref_filename,
75 base::SequencedTaskRunner* pref_io_task_runner, 79 base::SequencedTaskRunner* pref_io_task_runner,
76 TrackedPreferenceValidationDelegate* validation_delegate, 80 TrackedPreferenceValidationDelegate* validation_delegate,
77 policy::PolicyService* policy_service, 81 policy::PolicyService* policy_service,
78 SupervisedUserSettingsService* supervised_user_settings, 82 SupervisedUserSettingsService* supervised_user_settings,
79 const scoped_refptr<PrefStore>& extension_prefs, 83 const scoped_refptr<PrefStore>& extension_prefs,
80 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, 84 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
81 bool async); 85 bool async,
86 service_manager::Connector* connector);
82 87
83 // Call before startup tasks kick in to ignore the presence of a domain when 88 // Call before startup tasks kick in to ignore the presence of a domain when
84 // determining the active SettingsEnforcement group. For testing only. 89 // determining the active SettingsEnforcement group. For testing only.
85 void DisableDomainCheckForTesting(); 90 void DisableDomainCheckForTesting();
86 91
87 // Initializes the preferences for the profile at |profile_path| with the 92 // Initializes the preferences for the profile at |profile_path| with the
88 // preference values in |master_prefs|. Returns true on success. 93 // preference values in |master_prefs|. Returns true on success.
89 bool InitializePrefsFromMasterPrefs( 94 bool InitializePrefsFromMasterPrefs(
90 const base::FilePath& profile_path, 95 const base::FilePath& profile_path,
91 std::unique_ptr<base::DictionaryValue> master_prefs); 96 std::unique_ptr<base::DictionaryValue> master_prefs);
92 97
93 // Retrieves the time of the last preference reset event, if any, for the 98 // Retrieves the time of the last preference reset event, if any, for the
94 // provided profile. If no reset has occurred, returns a null |Time|. 99 // provided profile. If no reset has occurred, returns a null |Time|.
95 base::Time GetResetTime(Profile* profile); 100 base::Time GetResetTime(Profile* profile);
96 101
97 // Clears the time of the last preference reset event, if any, for the provided 102 // Clears the time of the last preference reset event, if any, for the provided
98 // profile. 103 // profile.
99 void ClearResetTime(Profile* profile); 104 void ClearResetTime(Profile* profile);
100 105
101 // Register user prefs used by chrome preference system. 106 // Register user prefs used by chrome preference system.
102 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 107 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
103 108
104 } // namespace chrome_prefs 109 } // namespace chrome_prefs
105 110
106 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_ 111 #endif // CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698