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

Unified Diff: chrome/browser/sync/test/integration/sync_test.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/sync/sync_global_error_unittest.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 68d93bfc08d444f38943677622a69a5e5ea6fcde..77729564aebf127dd46b39fb291d023bf8d7f579 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/process/launch.h"
@@ -142,34 +143,33 @@ void SetupNetworkCallback(
done->Signal();
}
-KeyedService* BuildFakeServerProfileInvalidationProvider(
+scoped_ptr<KeyedService> BuildFakeServerProfileInvalidationProvider(
content::BrowserContext* context) {
- return new invalidation::ProfileInvalidationProvider(
+ return make_scoped_ptr(new invalidation::ProfileInvalidationProvider(
scoped_ptr<invalidation::InvalidationService>(
- new fake_server::FakeServerInvalidationService));
+ new fake_server::FakeServerInvalidationService)));
}
-KeyedService* BuildP2PProfileInvalidationProvider(
+scoped_ptr<KeyedService> BuildP2PProfileInvalidationProvider(
content::BrowserContext* context,
syncer::P2PNotificationTarget notification_target) {
Profile* profile = static_cast<Profile*>(context);
- return new invalidation::ProfileInvalidationProvider(
+ return make_scoped_ptr(new invalidation::ProfileInvalidationProvider(
scoped_ptr<invalidation::InvalidationService>(
new invalidation::P2PInvalidationService(
scoped_ptr<IdentityProvider>(new ProfileIdentityProvider(
SigninManagerFactory::GetForProfile(profile),
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
LoginUIServiceFactory::GetForProfile(profile))),
- profile->GetRequestContext(),
- notification_target)));
+ profile->GetRequestContext(), notification_target))));
}
-KeyedService* BuildSelfNotifyingP2PProfileInvalidationProvider(
+scoped_ptr<KeyedService> BuildSelfNotifyingP2PProfileInvalidationProvider(
content::BrowserContext* context) {
return BuildP2PProfileInvalidationProvider(context, syncer::NOTIFY_ALL);
}
-KeyedService* BuildRealisticP2PProfileInvalidationProvider(
+scoped_ptr<KeyedService> BuildRealisticP2PProfileInvalidationProvider(
content::BrowserContext* context) {
return BuildP2PProfileInvalidationProvider(context, syncer::NOTIFY_OTHERS);
}
« no previous file with comments | « chrome/browser/sync/sync_global_error_unittest.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698