summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/profile_sync_service_unittest.cc
diff options
context:
space:
mode:
authorskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 22:20:26 +0000
committerskrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 22:20:26 +0000
commit500f176dbbd17fee9f903d0163dafa89593cc1c0 (patch)
tree4a7550425c7bf70879d4146b959bac0ab0712131 /chrome/browser/sync/profile_sync_service_unittest.cc
parent4cedf0dadf16c181be11d86f15af28c43c81b705 (diff)
downloadchromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.zip
chromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.tar.gz
chromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.tar.bz2
This change will include preferences as part of the usual startup sequence of the PSS that already includes bookmarks. This is a temporary solution until we have a proper component to manage the startup and shutdown of multiple data types.
Review URL: http://codereview.chromium.org/601037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service_unittest.cc')
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc38
1 files changed, 1 insertions, 37 deletions
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 1753370..6f0726e 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -21,12 +21,11 @@
#include "chrome/browser/sync/glue/model_associator.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/notification_method.h"
-#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_factory.h"
+#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/testing_profile.h"
-#include "chrome/test/sync/test_http_bridge_factory.h"
using std::vector;
using browser_sync::AssociatorInterface;
@@ -35,7 +34,6 @@ using browser_sync::BookmarkModelAssociator;
using browser_sync::ChangeProcessor;
using browser_sync::ModelAssociator;
using browser_sync::SyncBackendHost;
-using browser_sync::TestHttpBridgeFactory;
class TestProfileSyncFactory : public ProfileSyncFactory {
public:
@@ -123,40 +121,6 @@ class TestModelAssociator : public BookmarkModelAssociator {
~TestModelAssociator() {}
};
-class TestProfileSyncService : public ProfileSyncService {
- public:
- explicit TestProfileSyncService(Profile* profile)
- : ProfileSyncService(profile) {
- RegisterPreferences();
- SetSyncSetupCompleted();
- }
- virtual ~TestProfileSyncService() {
- }
-
- virtual void InitializeBackend(bool delete_sync_data_folder) {
- TestHttpBridgeFactory* factory = new TestHttpBridgeFactory();
- TestHttpBridgeFactory* factory2 = new TestHttpBridgeFactory();
- backend()->InitializeForTestMode(L"testuser", factory, factory2,
- delete_sync_data_folder, browser_sync::kDefaultNotificationMethod);
- // The SyncBackend posts a task to the current loop when initialization
- // completes.
- MessageLoop::current()->Run();
- // Initialization is synchronous for test mode, so we should be good to go.
- DCHECK(sync_initialized());
- }
-
- virtual void OnBackendInitialized() {
- ProfileSyncService::OnBackendInitialized();
- MessageLoop::current()->Quit();
- }
-
- // TODO(skrul): how to handle this?
- virtual bool MergeAndSyncAcceptanceNeeded() {
- // Never show the dialog.
- return false;
- }
-};
-
// FakeServerChange constructs a list of sync_api::ChangeRecords while modifying
// the sync model, and can pass the ChangeRecord list to a
// sync_api::SyncObserver (i.e., the ProfileSyncService) to test the client