| 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 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/sync/syncable/syncable.h" | 9 #include "chrome/browser/sync/syncable/syncable.h" |
| 10 #include "chrome/browser/sync/syncable/syncable_changes_version.h" | 10 #include "chrome/browser/sync/syncable/syncable_changes_version.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ////////////////////////////////////// | 50 ////////////////////////////////////// |
| 51 // Strings | 51 // Strings |
| 52 {"non_unique_name", "varchar"}, | 52 {"non_unique_name", "varchar"}, |
| 53 {"server_non_unique_name", "varchar(255)"}, | 53 {"server_non_unique_name", "varchar(255)"}, |
| 54 {"unique_server_tag", "varchar"}, | 54 {"unique_server_tag", "varchar"}, |
| 55 {"unique_client_tag", "varchar"}, | 55 {"unique_client_tag", "varchar"}, |
| 56 ////////////////////////////////////// | 56 ////////////////////////////////////// |
| 57 // Blobs. | 57 // Blobs. |
| 58 {"specifics", "blob"}, | 58 {"specifics", "blob"}, |
| 59 {"server_specifics", "blob"}, | 59 {"server_specifics", "blob"}, |
| 60 {"base_server_specifics", "blob"} |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 // At least enforce that there are equal number of column names and fields. | 63 // At least enforce that there are equal number of column names and fields. |
| 63 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name); | 64 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name); |
| 64 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); | 65 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); |
| 65 | 66 |
| 66 static inline const char* ColumnName(int field) { | 67 static inline const char* ColumnName(int field) { |
| 67 DCHECK(field < BEGIN_TEMPS); | 68 DCHECK(field < BEGIN_TEMPS); |
| 68 return g_metas_columns[field].name; | 69 return g_metas_columns[field].name; |
| 69 } | 70 } |
| 70 | 71 |
| 71 } // namespace syncable | 72 } // namespace syncable |
| 72 | 73 |
| 73 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 74 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
| OLD | NEW |