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

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

Issue 3127017: Revert 56423 - Added classes to enable session sync functionality.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/sessions/tab_restore_service.h ('k') | chrome/browser/sync/engine/syncapi.h » ('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.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_;
« no previous file with comments | « chrome/browser/sessions/tab_restore_service.h ('k') | chrome/browser/sync/engine/syncapi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698