OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
8 #include "chrome/browser/sync/syncable/syncable.h" | 8 #include "chrome/browser/sync/syncable/syncable.h" |
9 #include "chrome/browser/sync/syncable/syncable_changes_version.h" | 9 #include "chrome/browser/sync/syncable/syncable_changes_version.h" |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 {"bookmark_url", "varchar"}, | 58 {"bookmark_url", "varchar"}, |
59 {"server_bookmark_url", "varchar"}, | 59 {"server_bookmark_url", "varchar"}, |
60 {"singleton_tag", "varchar"}, | 60 {"singleton_tag", "varchar"}, |
61 ////////////////////////////////////// | 61 ////////////////////////////////////// |
62 // Blobs. | 62 // Blobs. |
63 {"bookmark_favicon", "blob"}, | 63 {"bookmark_favicon", "blob"}, |
64 {"server_bookmark_favicon", "blob"}, | 64 {"server_bookmark_favicon", "blob"}, |
65 }; | 65 }; |
66 | 66 |
67 // At least enforce that there are equal number of column names and fields. | 67 // At least enforce that there are equal number of column names and fields. |
68 COMPILE_ASSERT(ARRAYSIZE(g_metas_columns) >= FIELD_COUNT, missing_column_name); | 68 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name); |
69 COMPILE_ASSERT(ARRAYSIZE(g_metas_columns) <= FIELD_COUNT, extra_column_names); | 69 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); |
70 | 70 |
71 static inline const char* ColumnName(int field) { | 71 static inline const char* ColumnName(int field) { |
72 DCHECK(field < BEGIN_TEMPS); | 72 DCHECK(field < BEGIN_TEMPS); |
73 return g_metas_columns[field].name; | 73 return g_metas_columns[field].name; |
74 } | 74 } |
75 | 75 |
76 } // namespace syncable | 76 } // namespace syncable |
77 | 77 |
78 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ | 78 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ |
OLD | NEW |