OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ | 9 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ |
10 #define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ | 10 #define CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // An extension folder or an extension object. | 67 // An extension folder or an extension object. |
68 EXTENSIONS, | 68 EXTENSIONS, |
69 // An object representing a set of Nigori keys. | 69 // An object representing a set of Nigori keys. |
70 NIGORI, | 70 NIGORI, |
71 // An object representing a custom search engine. | 71 // An object representing a custom search engine. |
72 SEARCH_ENGINES, | 72 SEARCH_ENGINES, |
73 // An object representing a browser session. | 73 // An object representing a browser session. |
74 SESSIONS, | 74 SESSIONS, |
75 // An app folder or an app object. | 75 // An app folder or an app object. |
76 APPS, | 76 APPS, |
| 77 // A setting from the extension settings API. |
| 78 EXTENSION_SETTINGS, |
77 | 79 |
78 MODEL_TYPE_COUNT, | 80 MODEL_TYPE_COUNT, |
79 }; | 81 }; |
80 | 82 |
81 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; | 83 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; |
82 typedef std::set<ModelType> ModelTypeSet; | 84 typedef std::set<ModelType> ModelTypeSet; |
83 | 85 |
84 inline ModelType ModelTypeFromInt(int i) { | 86 inline ModelType ModelTypeFromInt(int i) { |
85 DCHECK_GE(i, 0); | 87 DCHECK_GE(i, 0); |
86 DCHECK_LT(i, MODEL_TYPE_COUNT); | 88 DCHECK_LT(i, MODEL_TYPE_COUNT); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 170 |
169 // Returns a ModelTypeSet with all real model types. | 171 // Returns a ModelTypeSet with all real model types. |
170 ModelTypeSet GetAllRealModelTypes(); | 172 ModelTypeSet GetAllRealModelTypes(); |
171 | 173 |
172 // Returns true if |model_type| is a real datatype | 174 // Returns true if |model_type| is a real datatype |
173 bool IsRealDataType(ModelType model_type); | 175 bool IsRealDataType(ModelType model_type); |
174 | 176 |
175 } // namespace syncable | 177 } // namespace syncable |
176 | 178 |
177 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ | 179 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ |
OLD | NEW |