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

Unified Diff: chrome/browser/sync/profile_sync_service_typed_url_unittest.cc

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 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
Index: chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index 23c6edd8305f05fa9245d4b0fbff11e167a944cf..c1f2fd9ebd2b9dc57831599abf45b08e2c5b9b53 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -38,7 +38,6 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
-#include "chrome/test/base/profile_mock.h"
#include "chrome/test/base/testing_profile.h"
#include "components/browser_context_keyed_service/refcounted_browser_context_keyed_service.h"
#include "content/public/browser/notification_service.h"
@@ -184,7 +183,10 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
virtual void SetUp() {
AbstractProfileSyncServiceTest::SetUp();
- profile_.reset(new ProfileMock());
+ TestingProfile::Builder builder;
+ builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(),
+ FakeOAuth2TokenService::BuildTokenService);
+ profile_ = builder.Build().Pass();
invalidation::InvalidationServiceFactory::GetInstance()->
SetBuildOnlyFakeInvalidatorsForTest(true);
history_backend_ = new HistoryBackendMock();
@@ -214,8 +216,6 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
token_service_ = static_cast<TokenService*>(
TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(), BuildTokenService));
- ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory(
- profile_.get(), FakeOAuth2TokenService::BuildTokenService);
sync_service_ = static_cast<TestProfileSyncService*>(
ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(),
@@ -322,7 +322,7 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest {
scoped_ptr<Thread> history_thread_;
- scoped_ptr<ProfileMock> profile_;
+ scoped_ptr<TestingProfile> profile_;
scoped_refptr<HistoryBackendMock> history_backend_;
HistoryServiceMock* history_service_;
browser_sync::DataTypeErrorHandlerMock error_handler_;
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | chrome/browser/sync/profile_sync_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698