From 3273dceb702908e7a2e7c13488d0bdfcdce2148b Mon Sep 17 00:00:00 2001 From: "nick@chromium.org" Date: Wed, 27 Jan 2010 16:08:08 +0000 Subject: In the sync database, use protobuf-based storage. Drop the old bookmark-only columns. Add getters and setters for BookmarkSpecifics to syncapi as well as syncable entries. Make the datatype be a required property when creating a syncapi node. Add a datatype for the 'google chrome' top level folder. Add database migrations from version 67 to the new schema. Add infrastructure to support migrations generically. Add unit tests for the migrations. Pull a new version of the protobuf library to pick up a fix for a bug that this change exposed (I upstreamed the fix). Fix some example code in the sql helpers so that it would actually compile. BUG=29899,30041 TEST=New unit tests for migrations: unit tests are based on actual database dumps. Additionally, I manually tested 2-client sync using combos of old-protocol servers, new-protocol servers, and initial database versions v67, v68, and v0 (new client). I manually verified that add/edit/delete works in these combination cases. Afterwards I verified (by inspecting the sync databases) that the ModelTypes are consistent across the various migration/protocol paths. Review URL: http://codereview.chromium.org/554066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37253 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/protobuf2/config.h | 12 +++++++++--- third_party/protobuf2/protobuf.gyp | 15 ++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'third_party/protobuf2') diff --git a/third_party/protobuf2/config.h b/third_party/protobuf2/config.h index cb0bb00..3d38f04 100644 --- a/third_party/protobuf2/config.h +++ b/third_party/protobuf2/config.h @@ -1,12 +1,18 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* the name of */ +#define HASH_MAP_CLASS hash_map + /* the location of */ #define HASH_MAP_H /* the namespace of hash_map/hash_set */ #define HASH_NAMESPACE __gnu_cxx +/* the name of */ +#define HASH_SET_CLASS hash_set + /* the location of */ #define HASH_SET_H @@ -86,13 +92,13 @@ #define PACKAGE_NAME "Protocol Buffers" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Protocol Buffers 2.1.1-pre" +#define PACKAGE_STRING "Protocol Buffers 2.3.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "protobuf" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.1.1-pre" +#define PACKAGE_VERSION "2.3.0" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -102,7 +108,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.1.1-pre" +#define VERSION "2.3.0" /* Define to 1 if on AIX 3. System headers sometimes define this. diff --git a/third_party/protobuf2/protobuf.gyp b/third_party/protobuf2/protobuf.gyp index d96d131..95272e9c 100644 --- a/third_party/protobuf2/protobuf.gyp +++ b/third_party/protobuf2/protobuf.gyp @@ -64,6 +64,7 @@ 'src/src/google/protobuf/repeated_field.cc', 'src/src/google/protobuf/wire_format_lite.cc', 'src/src/google/protobuf/io/coded_stream.cc', + 'src/src/google/protobuf/io/coded_stream_inl.h', 'src/src/google/protobuf/io/zero_copy_stream.cc', 'src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc', '<(config_h_dir)/config.h', @@ -116,10 +117,10 @@ 'src/src/google/protobuf/compiler/importer.h', 'src/src/google/protobuf/compiler/parser.h', - 'src/src/google/protobuf/stubs/substitute.cc', - 'src/src/google/protobuf/stubs/substitute.h', 'src/src/google/protobuf/stubs/strutil.cc', 'src/src/google/protobuf/stubs/strutil.h', + 'src/src/google/protobuf/stubs/substitute.cc', + 'src/src/google/protobuf/stubs/substitute.h', 'src/src/google/protobuf/stubs/structurally_valid.cc', 'src/src/google/protobuf/descriptor.cc', 'src/src/google/protobuf/descriptor.pb.cc', @@ -156,6 +157,12 @@ 'sources': [ 'src/src/google/protobuf/compiler/code_generator.cc', 'src/src/google/protobuf/compiler/command_line_interface.cc', + 'src/src/google/protobuf/compiler/plugin.cc', + 'src/src/google/protobuf/compiler/plugin.pb.cc', + 'src/src/google/protobuf/compiler/subprocess.cc', + 'src/src/google/protobuf/compiler/subprocess.h', + 'src/src/google/protobuf/compiler/zip_writer.cc', + 'src/src/google/protobuf/compiler/zip_writer.h', 'src/src/google/protobuf/compiler/cpp/cpp_enum.cc', 'src/src/google/protobuf/compiler/cpp/cpp_enum.h', 'src/src/google/protobuf/compiler/cpp/cpp_enum_field.cc', @@ -203,18 +210,16 @@ 'src/src/google/protobuf/compiler/python/python_generator.cc', 'src/src/google/protobuf/compiler/main.cc', ], - 'dependencies': [ 'protobuf', ], - 'include_dirs': [ '<(config_h_dir)', 'src/src', ], }, ], - } +} # Local Variables: # tab-width:2 -- cgit v1.1