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

Unified Diff: chrome/browser/sync/engine/nigori_util_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/engine/nigori_util_unittest.cc
diff --git a/chrome/browser/sync/engine/nigori_util_unittest.cc b/chrome/browser/sync/engine/nigori_util_unittest.cc
index 1472f3933e17ec96febe3183eb8afbf8a75ffbaf..3c0d83c0e53a1db709b11d8c8aaa70b9415a89f8 100644
--- a/chrome/browser/sync/engine/nigori_util_unittest.cc
+++ b/chrome/browser/sync/engine/nigori_util_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
+#include "chrome/browser/sync/protocol/sync.pb.h"
#include "chrome/browser/sync/util/cryptographer.h"
#include "chrome/browser/sync/engine/nigori_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,15 +21,15 @@ TEST(NigoriUtilTest, SpecificsNeedsEncryption) {
EXPECT_FALSE(SpecificsNeedsEncryption(ModelTypeSet(), specifics));
EXPECT_FALSE(SpecificsNeedsEncryption(encrypted_types, specifics));
- AddDefaultExtensionValue(PREFERENCES, &specifics);
+ AddDefaultFieldValue(PREFERENCES, &specifics);
EXPECT_FALSE(SpecificsNeedsEncryption(encrypted_types, specifics));
sync_pb::EntitySpecifics bookmark_specifics;
- AddDefaultExtensionValue(BOOKMARKS, &bookmark_specifics);
+ AddDefaultFieldValue(BOOKMARKS, &bookmark_specifics);
EXPECT_TRUE(SpecificsNeedsEncryption(encrypted_types, bookmark_specifics));
- bookmark_specifics.MutableExtension(sync_pb::bookmark)->set_title("title");
- bookmark_specifics.MutableExtension(sync_pb::bookmark)->set_url("url");
+ bookmark_specifics.mutable_bookmark()->set_title("title");
+ bookmark_specifics.mutable_bookmark()->set_url("url");
EXPECT_TRUE(SpecificsNeedsEncryption(encrypted_types, bookmark_specifics));
EXPECT_FALSE(SpecificsNeedsEncryption(ModelTypeSet(), bookmark_specifics));
@@ -37,7 +38,7 @@ TEST(NigoriUtilTest, SpecificsNeedsEncryption) {
EXPECT_FALSE(SpecificsNeedsEncryption(ModelTypeSet(), bookmark_specifics));
sync_pb::EntitySpecifics password_specifics;
- AddDefaultExtensionValue(PASSWORDS, &password_specifics);
+ AddDefaultFieldValue(PASSWORDS, &password_specifics);
EXPECT_FALSE(SpecificsNeedsEncryption(encrypted_types, password_specifics));
}

Powered by Google App Engine
This is Rietveld 408576698