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

Unified Diff: chrome/browser/sync/test_profile_sync_service.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/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 70e89dd43e42b9910200911a9e060e73de5331f1..4ba4035024e9e052dd5cf5f6717925985c3b4d38 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/sync/test_profile_sync_service.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -127,20 +128,17 @@ TestProfileSyncService::~TestProfileSyncService() {
}
// static
-KeyedService* TestProfileSyncService::TestFactoryFunction(
+scoped_ptr<KeyedService> TestProfileSyncService::TestFactoryFunction(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
SigninManagerBase* signin =
SigninManagerFactory::GetForProfile(profile);
ProfileOAuth2TokenService* oauth2_token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
- return new TestProfileSyncService(
+ return make_scoped_ptr(new TestProfileSyncService(
scoped_ptr<ProfileSyncComponentsFactory>(
new ProfileSyncComponentsFactoryMock()),
- profile,
- signin,
- oauth2_token_service,
- browser_sync::AUTO_START);
+ profile, signin, oauth2_token_service, browser_sync::AUTO_START));
}
// static
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | chrome/browser/themes/theme_syncable_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698