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

Unified Diff: chrome/browser/sync/api/sync_change_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
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.cc ('k') | chrome/browser/sync/api/sync_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/api/sync_change_unittest.cc
diff --git a/chrome/browser/sync/api/sync_change_unittest.cc b/chrome/browser/sync/api/sync_change_unittest.cc
index 494db9e955cb31af5dda5e4c6b12a83de86af94b..2091ef4e040501b8365aa434188615210b40e1bd 100644
--- a/chrome/browser/sync/api/sync_change_unittest.cc
+++ b/chrome/browser/sync/api/sync_change_unittest.cc
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/sync/protocol/preference_specifics.pb.h"
+#include "chrome/browser/sync/protocol/sync.pb.h"
#include "chrome/browser/sync/protocol/proto_value_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -34,8 +35,7 @@ TEST_F(SyncChangeTest, LocalDelete) {
TEST_F(SyncChangeTest, LocalUpdate) {
SyncChange::SyncChangeType change_type = SyncChange::ACTION_UPDATE;
sync_pb::EntitySpecifics specifics;
- sync_pb::PreferenceSpecifics* pref_specifics =
- specifics.MutableExtension(sync_pb::preference);
+ sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference();
pref_specifics->set_name("test");
std::string tag = "client_tag";
std::string title = "client_title";
@@ -54,8 +54,7 @@ TEST_F(SyncChangeTest, LocalUpdate) {
TEST_F(SyncChangeTest, LocalAdd) {
SyncChange::SyncChangeType change_type = SyncChange::ACTION_ADD;
sync_pb::EntitySpecifics specifics;
- sync_pb::PreferenceSpecifics* pref_specifics =
- specifics.MutableExtension(sync_pb::preference);
+ sync_pb::PreferenceSpecifics* pref_specifics = specifics.mutable_preference();
pref_specifics->set_name("test");
std::string tag = "client_tag";
std::string title = "client_title";
@@ -77,7 +76,7 @@ TEST_F(SyncChangeTest, SyncerChanges) {
// Create an update.
sync_pb::EntitySpecifics update_specifics;
sync_pb::PreferenceSpecifics* pref_specifics =
- update_specifics.MutableExtension(sync_pb::preference);
+ update_specifics.mutable_preference();
pref_specifics->set_name("update");
change_list.push_back(SyncChange(
SyncChange::ACTION_UPDATE,
@@ -85,8 +84,7 @@ TEST_F(SyncChangeTest, SyncerChanges) {
// Create an add.
sync_pb::EntitySpecifics add_specifics;
- pref_specifics =
- add_specifics.MutableExtension(sync_pb::preference);
+ pref_specifics = add_specifics.mutable_preference();
pref_specifics->set_name("add");
change_list.push_back(SyncChange(
SyncChange::ACTION_ADD,
@@ -94,8 +92,7 @@ TEST_F(SyncChangeTest, SyncerChanges) {
// Create a delete.
sync_pb::EntitySpecifics delete_specifics;
- pref_specifics =
- delete_specifics.MutableExtension(sync_pb::preference);
+ pref_specifics = delete_specifics.mutable_preference();
pref_specifics->set_name("add");
change_list.push_back(SyncChange(
SyncChange::ACTION_DELETE,
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.cc ('k') | chrome/browser/sync/api/sync_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698