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

Unified Diff: chrome/browser/signin/account_reconcilor_unittest.cc

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 years, 6 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/signin/account_reconcilor_unittest.cc
diff --git a/chrome/browser/signin/account_reconcilor_unittest.cc b/chrome/browser/signin/account_reconcilor_unittest.cc
index 5ccfb01aa9afeafa86f17ddd4009f96929dec440..434bc79569cc09cbf25801d5aea2a4219b97f974 100644
--- a/chrome/browser/signin/account_reconcilor_unittest.cc
+++ b/chrome/browser/signin/account_reconcilor_unittest.cc
@@ -43,7 +43,7 @@ namespace {
class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> {
public:
- static KeyedService* Build(content::BrowserContext* context);
+ static scoped_ptr<KeyedService> Build(content::BrowserContext* context);
MockAccountReconcilor(ProfileOAuth2TokenService* token_service,
SigninManagerBase* signin_manager,
@@ -56,15 +56,16 @@ class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> {
};
// static
-KeyedService* MockAccountReconcilor::Build(content::BrowserContext* context) {
+scoped_ptr<KeyedService> MockAccountReconcilor::Build(
+ content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
- AccountReconcilor* reconcilor = new MockAccountReconcilor(
+ scoped_ptr<AccountReconcilor> reconcilor(new MockAccountReconcilor(
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
SigninManagerFactory::GetForProfile(profile),
ChromeSigninClientFactory::GetForProfile(profile),
- GaiaCookieManagerServiceFactory::GetForProfile(profile));
+ GaiaCookieManagerServiceFactory::GetForProfile(profile)));
reconcilor->Initialize(false /* start_reconcile_if_tokens_available */);
- return reconcilor;
+ return reconcilor.Pass();
}
MockAccountReconcilor::MockAccountReconcilor(
« no previous file with comments | « chrome/browser/sessions/session_service_factory.h ('k') | chrome/browser/signin/easy_unlock_app_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698