#include "chrome/browser/history/history_types.h"
#include "chrome/browser/invalidation/invalidation_service_factory.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
+#include "chrome/browser/signin/fake_profile_oauth2_token_service_wrapper.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/abstract_profile_sync_service_test.h"
-#include "chrome/browser/sync/glue/data_type_error_handler_mock.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/typed_url_change_processor.h"
#include "chrome/browser/sync/glue/typed_url_data_type_controller.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/test/base/testing_profile.h"
#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h"
+#include "components/sync_driver/data_type_error_handler_mock.h"
#include "content/public/browser/notification_service.h"
#include "google_apis/gaia/gaia_constants.h"
#include "sync/internal_api/public/read_node.h"
TestingProfile::Builder builder;
builder.AddTestingFactory(
ProfileOAuth2TokenServiceFactory::GetInstance(),
- FakeProfileOAuth2TokenService::BuildAutoIssuingTokenService);
+ FakeProfileOAuth2TokenServiceWrapper::BuildAutoIssuingTokenService);
profile_ = builder.Build().Pass();
invalidation::InvalidationServiceFactory::GetInstance()->
SetBuildOnlyFakeInvalidatorsForTest(true);
SigninManagerBase* signin =
SigninManagerFactory::GetForProfile(profile_.get());
signin->SetAuthenticatedUsername("test");
- sync_service_ = static_cast<TestProfileSyncService*>(
- ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
- profile_.get(),
- &TestProfileSyncService::BuildAutoStartAsyncInit));
- sync_service_->set_backend_init_callback(callback);
+ sync_service_ = TestProfileSyncService::BuildAutoStartAsyncInit(
+ profile_.get(), callback);
ProfileSyncComponentsFactoryMock* components =
sync_service_->components_factory_mock();
TypedUrlDataTypeController* data_type_controller =