| 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, |
| 61 // An app folder or an app object. | 63 // An app folder or an app object. |
| 62 APPS, | 64 APPS, |
| 63 | 65 |
| 64 MODEL_TYPE_COUNT, | 66 MODEL_TYPE_COUNT, |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; | 69 typedef std::bitset<MODEL_TYPE_COUNT> ModelTypeBitSet; |
| 68 typedef std::set<ModelType> ModelTypeSet; | 70 typedef std::set<ModelType> ModelTypeSet; |
| 69 | 71 |
| 70 inline ModelType ModelTypeFromInt(int i) { | 72 inline ModelType ModelTypeFromInt(int i) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 98 | 100 |
| 99 // Converts a notification type to a real model type. Returns true | 101 // Converts a notification type to a real model type. Returns true |
| 100 // iff |notification_type| was the notification type of a real model | 102 // iff |notification_type| was the notification type of a real model |
| 101 // type and |model_type| was filled in. | 103 // type and |model_type| was filled in. |
| 102 bool NotificationTypeToRealModelType(const std::string& notification_type, | 104 bool NotificationTypeToRealModelType(const std::string& notification_type, |
| 103 ModelType* model_type); | 105 ModelType* model_type); |
| 104 | 106 |
| 105 } // namespace syncable | 107 } // namespace syncable |
| 106 | 108 |
| 107 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ | 109 #endif // CHROME_BROWSER_SYNC_SYNCABLE_MODEL_TYPE_H_ |
| OLD | NEW |