| 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 #ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 5 #ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| 6 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 6 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <ostream> | 10 #include <ostream> |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 bool IsControlType(ModelType model_type); | 238 bool IsControlType(ModelType model_type); |
| 239 | 239 |
| 240 // Core types are those data types used by sync's core functionality (i.e. not | 240 // Core types are those data types used by sync's core functionality (i.e. not |
| 241 // user data types). These types are always enabled, and include ControlTypes(). | 241 // user data types). These types are always enabled, and include ControlTypes(). |
| 242 // | 242 // |
| 243 // The set of all core types. | 243 // The set of all core types. |
| 244 ModelTypeSet CoreTypes(); | 244 ModelTypeSet CoreTypes(); |
| 245 // Those core types that have high priority (includes ControlTypes()). | 245 // Those core types that have high priority (includes ControlTypes()). |
| 246 ModelTypeSet PriorityCoreTypes(); | 246 ModelTypeSet PriorityCoreTypes(); |
| 247 | 247 |
| 248 // Types that may commit data, but should never be included in a GetUpdates. |
| 249 ModelTypeSet CommitOnlyTypes(); |
| 250 |
| 248 // Determine a model type from the field number of its associated | 251 // Determine a model type from the field number of its associated |
| 249 // EntitySpecifics field. Returns UNSPECIFIED if the field number is | 252 // EntitySpecifics field. Returns UNSPECIFIED if the field number is |
| 250 // not recognized. | 253 // not recognized. |
| 251 // | 254 // |
| 252 // If you're putting the result in a ModelTypeSet, you should use the | 255 // If you're putting the result in a ModelTypeSet, you should use the |
| 253 // following pattern: | 256 // following pattern: |
| 254 // | 257 // |
| 255 // ModelTypeSet model_types; | 258 // ModelTypeSet model_types; |
| 256 // // Say we're looping through a list of items, each of which has a | 259 // // Say we're looping through a list of items, each of which has a |
| 257 // // field number. | 260 // // field number. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 352 |
| 350 // Returns true if |model_type| supports parent-child hierarchy or entries. | 353 // Returns true if |model_type| supports parent-child hierarchy or entries. |
| 351 bool TypeSupportsHierarchy(ModelType model_type); | 354 bool TypeSupportsHierarchy(ModelType model_type); |
| 352 | 355 |
| 353 // Returns true if |model_type| supports ordering of sibling entries. | 356 // Returns true if |model_type| supports ordering of sibling entries. |
| 354 bool TypeSupportsOrdering(ModelType model_type); | 357 bool TypeSupportsOrdering(ModelType model_type); |
| 355 | 358 |
| 356 } // namespace syncer | 359 } // namespace syncer |
| 357 | 360 |
| 358 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ | 361 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ |
| OLD | NEW |