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

Unified Diff: sync/internal_api/sync_encryption_handler_impl_unittest.cc

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years 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 | « sync/internal_api/read_node.cc ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_encryption_handler_impl_unittest.cc
diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
index 65fc96408d15b7bc2404a1c3150584d40067361a..59934ba53762d51504bb6df109ea0f71edea5374 100644
--- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc
+++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
@@ -69,7 +69,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
virtual void SetUp() {
test_user_share_.SetUp();
SetUpEncryption();
- CreateRootForType(NIGORI);
+ TestUserShare::CreateRoot(NIGORI, user_share());
}
virtual void TearDown() {
@@ -86,30 +86,6 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
encryption_handler_->AddObserver(&observer_);
}
- void CreateRootForType(ModelType model_type) {
- syncer::syncable::Directory* directory = user_share()->directory.get();
-
- std::string tag_name = ModelTypeToRootTag(model_type);
-
- syncable::WriteTransaction wtrans(FROM_HERE, syncable::UNITTEST, directory);
- syncable::MutableEntry node(&wtrans,
- syncable::CREATE,
- wtrans.root_id(),
- tag_name);
- node.Put(syncable::UNIQUE_SERVER_TAG, tag_name);
- node.Put(syncable::IS_DIR, true);
- node.Put(syncable::SERVER_IS_DIR, false);
- node.Put(syncable::IS_UNSYNCED, false);
- node.Put(syncable::IS_UNAPPLIED_UPDATE, false);
- node.Put(syncable::SERVER_VERSION, 20);
- node.Put(syncable::BASE_VERSION, 20);
- node.Put(syncable::IS_DEL, false);
- node.Put(syncable::ID, ids_.MakeServer(tag_name));
- sync_pb::EntitySpecifics specifics;
- syncer::AddDefaultFieldValue(model_type, &specifics);
- node.Put(syncable::SPECIFICS, specifics);
- }
-
void PumpLoop() {
message_loop_.RunUntilIdle();
}
« no previous file with comments | « sync/internal_api/read_node.cc ('k') | sync/internal_api/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698