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

Unified Diff: chrome/browser/sync/protocol/proto_value_conversions_unittest.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/protocol/proto_value_conversions_unittest.cc
diff --git a/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc b/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc
index de61897de7eff732a895d40cc7df2a5acc7bf5ed..699ead89fc5b8506fb253d07a24f279abecc0c0c 100644
--- a/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc
+++ b/chrome/browser/sync/protocol/proto_value_conversions_unittest.cc
@@ -162,25 +162,25 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
sync_pb::EntitySpecifics specifics;
// Touch the extensions to make sure it shows up in the generated
// value.
-#define SET_EXTENSION(key) (void)specifics.MutableExtension(sync_pb::key)
-
- SET_EXTENSION(app);
- SET_EXTENSION(app_notification);
- SET_EXTENSION(app_setting);
- SET_EXTENSION(autofill);
- SET_EXTENSION(autofill_profile);
- SET_EXTENSION(bookmark);
- SET_EXTENSION(extension);
- SET_EXTENSION(extension_setting);
- SET_EXTENSION(nigori);
- SET_EXTENSION(password);
- SET_EXTENSION(preference);
- SET_EXTENSION(search_engine);
- SET_EXTENSION(session);
- SET_EXTENSION(theme);
- SET_EXTENSION(typed_url);
-
-#undef SET_EXTENSION
+#define SET_FIELD(key) (void)specifics.mutable_##key()
+
+ SET_FIELD(app);
+ SET_FIELD(app_notification);
+ SET_FIELD(app_setting);
+ SET_FIELD(autofill);
+ SET_FIELD(autofill_profile);
+ SET_FIELD(bookmark);
+ SET_FIELD(extension);
+ SET_FIELD(extension_setting);
+ SET_FIELD(nigori);
+ SET_FIELD(password);
+ SET_FIELD(preference);
+ SET_FIELD(search_engine);
+ SET_FIELD(session);
+ SET_FIELD(theme);
+ SET_FIELD(typed_url);
+
+#undef SET_FIELD
scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(specifics));
EXPECT_EQ(syncable::MODEL_TYPE_COUNT - syncable::FIRST_REAL_MODEL_TYPE,
« no previous file with comments | « chrome/browser/sync/protocol/proto_value_conversions.cc ('k') | chrome/browser/sync/protocol/search_engine_specifics.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698