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

Side by Side Diff: base/prefs/public/pref_service_base.h

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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
« no previous file with comments | « base/prefs/public/pref_member_unittest.cc ('k') | chrome/browser/about_flags_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This is the base interface for a preference services that provides 5 // This is the base interface for a preference services that provides
6 // a way to access the application's current preferences. 6 // a way to access the application's current preferences.
7 // 7 //
8 // This base interface assumes all preferences are local. See 8 // This base interface assumes all preferences are local. See
9 // SyncablePrefServiceBase for the interface to a preference service 9 // SyncablePrefServiceBase for the interface to a preference service
10 // that stores preferences that can be synced. 10 // that stores preferences that can be synced.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 }; 100 };
101 101
102 // Returns true if the preference for the given preference name is available 102 // Returns true if the preference for the given preference name is available
103 // and is managed. 103 // and is managed.
104 virtual bool IsManagedPreference(const char* pref_name) const = 0; 104 virtual bool IsManagedPreference(const char* pref_name) const = 0;
105 105
106 // Returns |true| if a preference with the given name is available and its 106 // Returns |true| if a preference with the given name is available and its
107 // value can be changed by the user. 107 // value can be changed by the user.
108 virtual bool IsUserModifiablePreference(const char* pref_name) const = 0; 108 virtual bool IsUserModifiablePreference(const char* pref_name) const = 0;
109 109
110 // Unregisters a preference.
111 virtual void UnregisterPreference(const char* path) = 0;
112
113 // Look up a preference. Returns NULL if the preference is not 110 // Look up a preference. Returns NULL if the preference is not
114 // registered. 111 // registered.
115 virtual const Preference* FindPreference(const char* pref_name) const = 0; 112 virtual const Preference* FindPreference(const char* pref_name) const = 0;
116 113
117 // If the path is valid and the value at the end of the path matches the type 114 // If the path is valid and the value at the end of the path matches the type
118 // specified, it will return the specified value. Otherwise, the default 115 // specified, it will return the specified value. Otherwise, the default
119 // value (set when the pref was registered) will be returned. 116 // value (set when the pref was registered) will be returned.
120 virtual bool GetBoolean(const char* path) const = 0; 117 virtual bool GetBoolean(const char* path) const = 0;
121 virtual int GetInteger(const char* path) const = 0; 118 virtual int GetInteger(const char* path) const = 0;
122 virtual double GetDouble(const char* path) const = 0; 119 virtual double GetDouble(const char* path) const = 0;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // 167 //
171 // If the pref at the given path changes, we call the observer's 168 // If the pref at the given path changes, we call the observer's
172 // OnPreferenceChanged method. Note that observers should not call 169 // OnPreferenceChanged method. Note that observers should not call
173 // these methods directly but rather use a PrefChangeRegistrar to 170 // these methods directly but rather use a PrefChangeRegistrar to
174 // make sure the observer gets cleaned up properly. 171 // make sure the observer gets cleaned up properly.
175 virtual void AddPrefObserver(const char* path, PrefObserver* obs) = 0; 172 virtual void AddPrefObserver(const char* path, PrefObserver* obs) = 0;
176 virtual void RemovePrefObserver(const char* path, PrefObserver* obs) = 0; 173 virtual void RemovePrefObserver(const char* path, PrefObserver* obs) = 0;
177 }; 174 };
178 175
179 #endif // BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_ 176 #endif // BASE_PREFS_PUBLIC_PREF_SERVICE_BASE_H_
OLDNEW
« no previous file with comments | « base/prefs/public/pref_member_unittest.cc ('k') | chrome/browser/about_flags_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698