Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: sync/syncable/syncable_columns.h

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 // protocol (ms since Unix epoch). 30 // protocol (ms since Unix epoch).
31 {"mtime", "bigint default 0"}, 31 {"mtime", "bigint default 0"},
32 {"server_mtime", "bigint default 0"}, 32 {"server_mtime", "bigint default 0"},
33 {"ctime", "bigint default 0"}, 33 {"ctime", "bigint default 0"},
34 {"server_ctime", "bigint default 0"}, 34 {"server_ctime", "bigint default 0"},
35 ////////////////////////////////////// 35 //////////////////////////////////////
36 // Ids 36 // Ids
37 {"id", "varchar(255) default \"r\""}, 37 {"id", "varchar(255) default \"r\""},
38 {"parent_id", "varchar(255) default \"r\""}, 38 {"parent_id", "varchar(255) default \"r\""},
39 {"server_parent_id", "varchar(255) default \"r\""}, 39 {"server_parent_id", "varchar(255) default \"r\""},
40 {"prev_id", "varchar(255) default \"r\""},
41 {"next_id", "varchar(255) default \"r\""},
42 ////////////////////////////////////// 40 //////////////////////////////////////
43 // bits 41 // bits
44 {"is_unsynced", "bit default 0"}, 42 {"is_unsynced", "bit default 0"},
45 {"is_unapplied_update", "bit default 0"}, 43 {"is_unapplied_update", "bit default 0"},
46 {"is_del", "bit default 0"}, 44 {"is_del", "bit default 0"},
47 {"is_dir", "bit default 0"}, 45 {"is_dir", "bit default 0"},
48 {"server_is_dir", "bit default 0"}, 46 {"server_is_dir", "bit default 0"},
49 {"server_is_del", "bit default 0"}, 47 {"server_is_del", "bit default 0"},
50 ////////////////////////////////////// 48 //////////////////////////////////////
51 // Strings 49 // Strings
52 {"non_unique_name", "varchar"}, 50 {"non_unique_name", "varchar"},
53 {"server_non_unique_name", "varchar(255)"}, 51 {"server_non_unique_name", "varchar(255)"},
54 {"unique_server_tag", "varchar"}, 52 {"unique_server_tag", "varchar"},
55 {"unique_client_tag", "varchar"}, 53 {"unique_client_tag", "varchar"},
56 ////////////////////////////////////// 54 //////////////////////////////////////
57 // Blobs (serialized protos). 55 // Blobs (serialized protos).
58 {"specifics", "blob"}, 56 {"specifics", "blob"},
59 {"server_specifics", "blob"}, 57 {"server_specifics", "blob"},
60 {"base_server_specifics", "blob"}, 58 {"base_server_specifics", "blob"},
61 ////////////////////////////////////// 59 //////////////////////////////////////
62 // Blobs (ordinals). 60 // Blobs (positions).
63 {"server_ordinal_in_parent", "blob"}, 61 {"server_unique_position", "blob"},
62 {"unique_position", "blob"},
63 //////////////////////////////////////
64 // Blobs (bytes).
65 {"unique_bookmark_tag", "blob"},
64 }; 66 };
65 67
66 // At least enforce that there are equal number of column names and fields. 68 // 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); 69 COMPILE_ASSERT(arraysize(g_metas_columns) >= FIELD_COUNT, missing_column_name);
68 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names); 70 COMPILE_ASSERT(arraysize(g_metas_columns) <= FIELD_COUNT, extra_column_names);
69 71
70 static inline const char* ColumnName(int field) { 72 static inline const char* ColumnName(int field) {
71 DCHECK(field < BEGIN_TEMPS); 73 DCHECK(field < BEGIN_TEMPS);
72 return g_metas_columns[field].name; 74 return g_metas_columns[field].name;
73 } 75 }
74 76
75 } // namespace syncable 77 } // namespace syncable
76 } // namespace syncer 78 } // namespace syncer
77 79
78 #endif // SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_ 80 #endif // SYNC_SYNCABLE_SYNCABLE_COLUMNS_H_
OLDNEW
« no previous file with comments | « sync/syncable/scoped_parent_child_index_updater.cc ('k') | sync/syncable/syncable_enum_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698