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

Unified Diff: chrome/browser/sync/syncable/directory_backing_store.cc

Issue 9460047: sync: remove use of protobuf extensions in protocol to reduce static init overhead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fred's review Created 8 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/syncable/directory_backing_store.cc
diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc
index 65c3278ce4a41626dff9ec057146c388e420008f..7c4d7485099e2c1f515fa47f9d74fbac6f94c3fa 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.cc
+++ b/chrome/browser/sync/syncable/directory_backing_store.cc
@@ -569,7 +569,7 @@ ModelType DirectoryBackingStore::ModelIdToModelTypeEnum(
// static
string DirectoryBackingStore::ModelTypeEnumToModelId(ModelType model_type) {
sync_pb::EntitySpecifics specifics;
- syncable::AddDefaultExtensionValue(model_type, &specifics);
+ syncable::AddDefaultFieldValue(model_type, &specifics);
return specifics.SerializeAsString();
}
@@ -680,7 +680,7 @@ void EncodeBookmarkURLAndFavicon(sql::Statement* old_value_query,
if (old_is_bookmark_object) {
sync_pb::BookmarkSpecifics* bookmark_data =
- mutable_new_value->MutableExtension(sync_pb::bookmark);
+ mutable_new_value->mutable_bookmark();
if (!old_is_dir) {
bookmark_data->set_url(old_url);
bookmark_data->set_favicon(old_favicon);
@@ -884,7 +884,7 @@ bool DirectoryBackingStore::MigrateVersion74To75() {
// time we check for updates.
sync_pb::DataTypeProgressMarker progress_marker;
progress_marker.set_data_type_id(
- GetExtensionFieldNumberFromModelType(type));
+ GetSpecificsFieldNumberFromModelType(type));
progress_marker.set_timestamp_token_for_migration(query.ColumnInt64(1));
std::string progress_blob;
progress_marker.SerializeToString(&progress_blob);

Powered by Google App Engine
This is Rietveld 408576698