| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 5 #ifndef SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| 6 #define SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 6 #define SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| 7 | 7 |
| 8 #include "sync/syncable/entry_kernel.h" | 8 #include "sync/syncable/entry_kernel.h" |
| 9 #include "sync/syncable/syncable_changes_version.h" | 9 #include "sync/syncable/syncable_changes_version.h" |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 {"unique_bookmark_tag", "varchar"}, | 54 {"unique_bookmark_tag", "varchar"}, |
| 55 ////////////////////////////////////// | 55 ////////////////////////////////////// |
| 56 // Blobs (serialized protos). | 56 // Blobs (serialized protos). |
| 57 {"specifics", "blob"}, | 57 {"specifics", "blob"}, |
| 58 {"server_specifics", "blob"}, | 58 {"server_specifics", "blob"}, |
| 59 {"base_server_specifics", "blob"}, | 59 {"base_server_specifics", "blob"}, |
| 60 ////////////////////////////////////// | 60 ////////////////////////////////////// |
| 61 // Blobs (positions). | 61 // Blobs (positions). |
| 62 {"server_unique_position", "blob"}, | 62 {"server_unique_position", "blob"}, |
| 63 {"unique_position", "blob"}, | 63 {"unique_position", "blob"}, |
| 64 ////////////////////////////////////// |
| 65 // AttachmentMetadata |
| 66 {"attachment_metadata", "blob"} |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 // At least enforce that there are equal number of column names and fields. | 69 // At least enforce that there are equal number of column names and fields. |
| 67 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name); | 70 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name); |
| 68 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); | 71 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); |
| 69 | 72 |
| 70 static inline const char* ColumnName(int field) { | 73 static inline const char* ColumnName(int field) { |
| 71 DCHECK(field < BEGIN_TEMPS); | 74 DCHECK(field < BEGIN_TEMPS); |
| 72 return g_metas_columns[field].name; | 75 return g_metas_columns[field].name; |
| 73 } | 76 } |
| 74 | 77 |
| 75 } // namespace syncable | 78 } // namespace syncable |
| 76 } // namespace syncer | 79 } // namespace syncer |
| 77 | 80 |
| 78 #endif // SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 81 #endif // SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| OLD | NEW |