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

Side by Side Diff: base/prefs/pref_service.h

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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
« no previous file with comments | « base/prefs/pref_notifier_impl.h ('k') | base/prefs/pref_service.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 provides a way to access the application's current preferences. 5 // This provides a way to access the application's current preferences.
6 6
7 // Chromium settings and storage represent user-selected preferences and 7 // Chromium settings and storage represent user-selected preferences and
8 // information and MUST not be extracted, overwritten or modified except 8 // information and MUST not be extracted, overwritten or modified except
9 // through Chromium defined APIs. 9 // through Chromium defined APIs.
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 PrefRegistry* pref_registry, 158 PrefRegistry* pref_registry,
159 base::Callback<void(PersistentPrefStore::PrefReadError)> 159 base::Callback<void(PersistentPrefStore::PrefReadError)>
160 read_error_callback, 160 read_error_callback,
161 bool async); 161 bool async);
162 virtual ~PrefService(); 162 virtual ~PrefService();
163 163
164 // Lands pending writes to disk. This should only be used if we need to save 164 // Lands pending writes to disk. This should only be used if we need to save
165 // immediately (basically, during shutdown). 165 // immediately (basically, during shutdown).
166 void CommitPendingWrite(); 166 void CommitPendingWrite();
167 167
168 // Schedule a write if there is any lossy data pending. Unlike
169 // CommitPendingWrite() this does not immediately sync to disk, instead it
170 // triggers an eventual write if there is lossy data pending and if there
171 // isn't one scheduled already.
172 void SchedulePendingLossyWrites();
173
168 // Returns true if the preference for the given preference name is available 174 // Returns true if the preference for the given preference name is available
169 // and is managed. 175 // and is managed.
170 bool IsManagedPreference(const std::string& pref_name) const; 176 bool IsManagedPreference(const std::string& pref_name) const;
171 177
172 // Returns true if the preference for the given preference name is available 178 // Returns true if the preference for the given preference name is available
173 // and is controlled by the parent/guardian of the child Account. 179 // and is controlled by the parent/guardian of the child Account.
174 bool IsPreferenceManagedByCustodian(const std::string& pref_name) const; 180 bool IsPreferenceManagedByCustodian(const std::string& pref_name) const;
175 181
176 // Returns |true| if a preference with the given name is available and its 182 // Returns |true| if a preference with the given name is available and its
177 // value can be changed by the user. 183 // value can be changed by the user.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 373
368 // Local cache of registered Preference objects. The pref_registry_ 374 // Local cache of registered Preference objects. The pref_registry_
369 // is authoritative with respect to what the types and default values 375 // is authoritative with respect to what the types and default values
370 // of registered preferences are. 376 // of registered preferences are.
371 mutable PreferenceMap prefs_map_; 377 mutable PreferenceMap prefs_map_;
372 378
373 DISALLOW_COPY_AND_ASSIGN(PrefService); 379 DISALLOW_COPY_AND_ASSIGN(PrefService);
374 }; 380 };
375 381
376 #endif // BASE_PREFS_PREF_SERVICE_H_ 382 #endif // BASE_PREFS_PREF_SERVICE_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_notifier_impl.h ('k') | base/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698