#include "chrome/browser/invalidation/invalidation_service_factory.h"
#include "chrome/browser/sessions/session_tab_helper.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.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager.h"
return true;
}
+ACTION_P(ReturnSyncBackendHost, callback) {
+ return new browser_sync::SyncBackendHostForProfileSyncTest(
+ arg1, arg2, callback);
+}
+
} // namespace
class ProfileSyncServiceSessionTest
TestingProfile::Builder builder;
builder.AddTestingFactory(
ProfileOAuth2TokenServiceFactory::GetInstance(),
- FakeProfileOAuth2TokenService::BuildAutoIssuingTokenService);
+ FakeProfileOAuth2TokenServiceWrapper::BuildAutoIssuingTokenService);
// Don't want the profile to create a real ProfileSyncService.
builder.AddTestingFactory(ProfileSyncServiceFactory::GetInstance(), NULL);
scoped_ptr<TestingProfile> profile(builder.Build());
signin,
oauth2_token_service,
ProfileSyncService::AUTO_START));
- sync_service_->set_backend_init_callback(callback);
+ EXPECT_CALL(*factory, CreateSyncBackendHost(_,_,_)).
+ WillOnce(ReturnSyncBackendHost(callback));
// Register the session data type.
SessionDataTypeController *dtc = new SessionDataTypeController(factory,