| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Enumerate the various item subtypes that are supported by sync. | 5 // Enumerate the various item subtypes that are supported by sync. |
| 6 // Each sync object is expected to have an immutable object type. | 6 // Each sync object is expected to have an immutable object type. |
| 7 // An object's type is inferred from the type of data it holds. | 7 // An object's type is inferred from the type of data it holds. |
| 8 | 8 |
| 9 #ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 9 #ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| 10 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 10 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // An object representing a set of Nigori keys. | 149 // An object representing a set of Nigori keys. |
| 150 NIGORI, | 150 NIGORI, |
| 151 FIRST_CONTROL_MODEL_TYPE = NIGORI, | 151 FIRST_CONTROL_MODEL_TYPE = NIGORI, |
| 152 // Flags to enable experimental features. | 152 // Flags to enable experimental features. |
| 153 EXPERIMENTS, | 153 EXPERIMENTS, |
| 154 LAST_CONTROL_MODEL_TYPE = EXPERIMENTS, | 154 LAST_CONTROL_MODEL_TYPE = EXPERIMENTS, |
| 155 LAST_REAL_MODEL_TYPE = LAST_CONTROL_MODEL_TYPE, | 155 LAST_REAL_MODEL_TYPE = LAST_CONTROL_MODEL_TYPE, |
| 156 | 156 |
| 157 // If you are adding a new sync datatype that is exposed to the user via the | 157 // If you are adding a new sync datatype that is exposed to the user via the |
| 158 // sync preferences UI, be sure to update the list in | 158 // sync preferences UI, be sure to update the list in |
| 159 // components/sync_driver/user_selectable_sync_type.h so that the UMA | 159 // components/sync/driver/user_selectable_sync_type.h so that the UMA |
| 160 // histograms for sync include your new type. In this case, be sure to also | 160 // histograms for sync include your new type. In this case, be sure to also |
| 161 // update the UserSelectableTypes() definition in | 161 // update the UserSelectableTypes() definition in |
| 162 // sync/syncable/model_type.cc. | 162 // sync/syncable/model_type.cc. |
| 163 MODEL_TYPE_COUNT, | 163 MODEL_TYPE_COUNT, |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 typedef EnumSet<ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> | 166 typedef EnumSet<ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> |
| 167 ModelTypeSet; | 167 ModelTypeSet; |
| 168 typedef EnumSet<ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelTypeSet; | 168 typedef EnumSet<ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelTypeSet; |
| 169 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap; | 169 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 // Returns true if |model_type| supports parent-child hierarchy or entries. | 348 // Returns true if |model_type| supports parent-child hierarchy or entries. |
| 349 bool TypeSupportsHierarchy(ModelType model_type); | 349 bool TypeSupportsHierarchy(ModelType model_type); |
| 350 | 350 |
| 351 // Returns true if |model_type| supports ordering of sibling entries. | 351 // Returns true if |model_type| supports ordering of sibling entries. |
| 352 bool TypeSupportsOrdering(ModelType model_type); | 352 bool TypeSupportsOrdering(ModelType model_type); |
| 353 | 353 |
| 354 } // namespace syncer | 354 } // namespace syncer |
| 355 | 355 |
| 356 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 356 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| OLD | NEW |