| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module prefs.mojom; | 5 module prefs.mojom; |
| 6 | 6 |
| 7 import "mojo/common/values.mojom"; | 7 import "mojo/common/values.mojom"; |
| 8 import "services/preferences/public/interfaces/preferences_configuration.mojom"; | 8 import "services/preferences/public/interfaces/preferences_configuration.mojom"; |
| 9 | 9 |
| 10 const string kServiceName = "preferences"; | 10 const string kServiceName = "preferences"; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 // An interface providing mutation access to a PersistentPrefStore. | 128 // An interface providing mutation access to a PersistentPrefStore. |
| 129 interface PersistentPrefStore { | 129 interface PersistentPrefStore { |
| 130 // Sets the values for prefs. | 130 // Sets the values for prefs. |
| 131 SetValues(array<PrefUpdate> updates); | 131 SetValues(array<PrefUpdate> updates); |
| 132 | 132 |
| 133 // These mirror the C++ PersistentPrefStore methods. | 133 // These mirror the C++ PersistentPrefStore methods. |
| 134 CommitPendingWrite(); | 134 CommitPendingWrite(); |
| 135 SchedulePendingLossyWrites(); | 135 SchedulePendingLossyWrites(); |
| 136 ClearMutableValues(); | 136 ClearMutableValues(); |
| 137 CleanupForProfileDeletion(); |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 // A registry of all prefs registered by a single client. | 140 // A registry of all prefs registered by a single client. |
| 140 struct PrefRegistry { | 141 struct PrefRegistry { |
| 141 array<string> registrations; | 142 array<string> registrations; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 struct PrefRegistration { | 145 struct PrefRegistration { |
| 145 mojo.common.mojom.Value default_value; | 146 mojo.common.mojom.Value default_value; |
| 146 | 147 |
| 147 // A bitfield of flags. Flag values are defined in | 148 // A bitfield of flags. Flag values are defined in |
| 148 // PrefRegistry::PrefRegistrationFlags and | 149 // PrefRegistry::PrefRegistrationFlags and |
| 149 // PrefRegistrySyncable::PrefRegistrationFlags. | 150 // PrefRegistrySyncable::PrefRegistrationFlags. |
| 150 uint32 flags; | 151 uint32 flags; |
| 151 }; | 152 }; |
| 152 | 153 |
| 153 interface PrefServiceControl { | 154 interface PrefServiceControl { |
| 154 // Initializes the pref service. This must be called before the service can | 155 // Initializes the pref service. This must be called before the service can |
| 155 // be used. | 156 // be used. |
| 156 Init(PersistentPrefStoreConfiguration configuration); | 157 Init(PersistentPrefStoreConfiguration configuration); |
| 157 }; | 158 }; |
| OLD | NEW |