| Index: chrome/browser/sync/abstract_profile_sync_service_test.h
|
| ===================================================================
|
| --- chrome/browser/sync/abstract_profile_sync_service_test.h (revision 56425)
|
| +++ chrome/browser/sync/abstract_profile_sync_service_test.h (working copy)
|
| @@ -16,7 +16,6 @@
|
| #include "chrome/browser/sync/glue/autofill_model_associator.h"
|
| #include "chrome/browser/sync/glue/password_model_associator.h"
|
| #include "chrome/browser/sync/glue/preference_model_associator.h"
|
| -#include "chrome/browser/sync/glue/session_model_associator.h"
|
| #include "chrome/browser/sync/glue/typed_url_model_associator.h"
|
| #include "chrome/browser/sync/profile_sync_factory_mock.h"
|
| #include "chrome/browser/sync/protocol/sync.pb.h"
|
| @@ -34,6 +33,7 @@
|
| using syncable::BASE_VERSION;
|
| using syncable::CREATE;
|
| using syncable::DirectoryManager;
|
| +using syncable::ID;
|
| using syncable::IS_DEL;
|
| using syncable::IS_DIR;
|
| using syncable::IS_UNAPPLIED_UPDATE;
|
| @@ -48,11 +48,13 @@
|
| using syncable::UNITTEST;
|
| using syncable::WriteTransaction;
|
|
|
| -class ProfileSyncServiceTestHelper {
|
| +class AbstractProfileSyncServiceTest : public testing::Test {
|
| public:
|
| - static bool CreateRoot(ModelType model_type, ProfileSyncService* service,
|
| - TestIdFactory* ids) {
|
| - UserShare* user_share = service->backend()->GetUserShareHandle();
|
| + AbstractProfileSyncServiceTest()
|
| + : ui_thread_(ChromeThread::UI, &message_loop_) {}
|
| +
|
| + bool CreateRoot(ModelType model_type) {
|
| + UserShare* user_share = service_->backend()->GetUserShareHandle();
|
| DirectoryManager* dir_manager = user_share->dir_manager.get();
|
|
|
| ScopedDirLookup dir(dir_manager, user_share->authenticated_name);
|
| @@ -76,9 +78,6 @@
|
| case syncable::TYPED_URLS:
|
| tag_name = browser_sync::kTypedUrlTag;
|
| break;
|
| - case syncable::SESSIONS:
|
| - tag_name = browser_sync::kSessionsTag;
|
| - break;
|
| default:
|
| return false;
|
| }
|
| @@ -96,25 +95,14 @@
|
| node.Put(SERVER_VERSION, 20);
|
| node.Put(BASE_VERSION, 20);
|
| node.Put(IS_DEL, false);
|
| - node.Put(syncable::ID, ids->MakeServer(tag_name));
|
| + node.Put(ID, ids_.MakeServer(tag_name));
|
| sync_pb::EntitySpecifics specifics;
|
| syncable::AddDefaultExtensionValue(model_type, &specifics);
|
| node.Put(SPECIFICS, specifics);
|
|
|
| return true;
|
| }
|
| -};
|
|
|
| -class AbstractProfileSyncServiceTest : public testing::Test {
|
| - public:
|
| - AbstractProfileSyncServiceTest()
|
| - : ui_thread_(ChromeThread::UI, &message_loop_) {}
|
| -
|
| - bool CreateRoot(ModelType model_type) {
|
| - return ProfileSyncServiceTestHelper::CreateRoot(model_type,
|
| - service_.get(), &ids_);
|
| - }
|
| -
|
| protected:
|
|
|
| MessageLoopForUI message_loop_;
|
|
|