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

Unified Diff: chrome/browser/sync/abstract_profile_sync_service_test.cc

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix several issues Created 8 years, 3 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.h ('k') | chrome/browser/sync/glue/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/abstract_profile_sync_service_test.cc
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.cc b/chrome/browser/sync/abstract_profile_sync_service_test.cc
index f12c501ef151a72a6690c06b2c947d98b34c75ad..ca135af66dd896be13ab9f34e45c77ebe1bef178 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.cc
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.cc
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
+#include "sync/internal_api/public/test/test_user_share.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/entry.h"
@@ -35,41 +36,6 @@ using syncer::syncable::UNITTEST;
using syncer::syncable::WriteTransaction;
/* static */
-const std::string ProfileSyncServiceTestHelper::GetTagForType(
- ModelType model_type) {
- return syncer::ModelTypeToRootTag(model_type);
-}
-
-/* static */
-bool ProfileSyncServiceTestHelper::CreateRoot(ModelType model_type,
- UserShare* user_share,
- TestIdFactory* ids) {
- syncer::syncable::Directory* directory = user_share->directory.get();
-
- std::string tag_name = GetTagForType(model_type);
-
- WriteTransaction wtrans(FROM_HERE, UNITTEST, directory);
- MutableEntry node(&wtrans,
- CREATE,
- wtrans.root_id(),
- tag_name);
- node.Put(UNIQUE_SERVER_TAG, tag_name);
- node.Put(IS_DIR, true);
- node.Put(SERVER_IS_DIR, false);
- node.Put(IS_UNSYNCED, false);
- node.Put(IS_UNAPPLIED_UPDATE, false);
- node.Put(SERVER_VERSION, 20);
- node.Put(BASE_VERSION, 20);
- node.Put(IS_DEL, false);
- node.Put(syncer::syncable::ID, ids->MakeServer(tag_name));
- sync_pb::EntitySpecifics specifics;
- syncer::AddDefaultFieldValue(model_type, &specifics);
- node.Put(SPECIFICS, specifics);
-
- return true;
-}
-
-/* static */
syncer::ImmutableChangeRecordList
ProfileSyncServiceTestHelper::MakeSingletonChangeRecordList(
int64 node_id, syncer::ChangeRecord::Action action) {
@@ -118,10 +84,8 @@ void AbstractProfileSyncServiceTest::TearDown() {
}
bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) {
- return ProfileSyncServiceTestHelper::CreateRoot(
- model_type,
- service_->GetUserShare(),
- service_->id_factory());
+ return syncer::TestUserShare::CreateRoot(model_type,
+ service_->GetUserShare());
}
// static
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.h ('k') | chrome/browser/sync/glue/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698