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

Unified Diff: chrome/browser/signin/signin_manager_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
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/test_signin_client_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager_unittest.cc
diff --git a/chrome/browser/signin/signin_manager_unittest.cc b/chrome/browser/signin/signin_manager_unittest.cc
index 68a4c3b7179883ee78b882c86cf52fbe096e9c56..3481dab79781e5f217125011d89d9ccc8fa49267 100644
--- a/chrome/browser/signin/signin_manager_unittest.cc
+++ b/chrome/browser/signin/signin_manager_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/testing_pref_service.h"
#include "base/run_loop.h"
@@ -48,16 +49,15 @@
namespace {
-KeyedService* SigninManagerBuild(content::BrowserContext* context) {
- SigninManager* service = NULL;
+scoped_ptr<KeyedService> SigninManagerBuild(content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
- service = new SigninManager(
+ scoped_ptr<SigninManager> service(new SigninManager(
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
AccountTrackerServiceFactory::GetForProfile(profile),
- GaiaCookieManagerServiceFactory::GetForProfile(profile));
+ GaiaCookieManagerServiceFactory::GetForProfile(profile)));
service->Initialize(NULL);
- return service;
+ return service.Pass();
}
class TestSigninManagerObserver : public SigninManagerBase::Observer {
« no previous file with comments | « chrome/browser/signin/fake_signin_manager.cc ('k') | chrome/browser/signin/test_signin_client_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698