OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // An autofill folder or an autofill object. | 51 // An autofill folder or an autofill object. |
52 AUTOFILL, | 52 AUTOFILL, |
53 // A themes folder or a themes object. | 53 // A themes folder or a themes object. |
54 THEMES, | 54 THEMES, |
55 // A typed_url folder or a typed_url object. | 55 // A typed_url folder or a typed_url object. |
56 TYPED_URLS, | 56 TYPED_URLS, |
57 // An extension folder or an extension object. | 57 // An extension folder or an extension object. |
58 EXTENSIONS, | 58 EXTENSIONS, |
59 // An object represeting a set of Nigori keys. | 59 // An object represeting a set of Nigori keys. |
60 NIGORI, | 60 NIGORI, |
61 // An object representing a browser session. | |
62 SESSIONS, | |
63 // An app folder or an app object. | 61 // An app folder or an app object. |
64 APPS, | 62 APPS, |
65 | 63 |
66 MODEL_TYPE_COUNT, | 64 MODEL_TYPE_COUNT, |
67 }; | 65 }; |
68 | 66 |
69 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; | 67 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; |
70 typedef std::set<ModelType> ModelTypeSet; | 68 typedef std::set<ModelType> ModelTypeSet; |
71 | 69 |
72 inline ModelType ModelTypeFromInt(int i) { | 70 inline ModelType ModelTypeFromInt(int i) { |
(...skipping 27 matching lines...) Expand all Loading... |
100 | 98 |
101 // Converts a notification type to a real model type. Returns true | 99 // Converts a notification type to a real model type. Returns true |
102 // iff |notification_type| was the notification type of a real model | 100 // iff |notification_type| was the notification type of a real model |
103 // type and |model_type| was filled in. | 101 // type and |model_type| was filled in. |
104 bool NotificationTypeToRealModelType(const std::string& notification_type, | 102 bool NotificationTypeToRealModelType(const std::string& notification_type, |
105 ModelType* model_type); | 103 ModelType* model_type); |
106 | 104 |
107 } // namespace syncable | 105 } // namespace syncable |
108 | 106 |
109 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ | 107 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ |
OLD | NEW |