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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_observer_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/ui/sync/one_click_signin_sync_observer_unittest.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
index 6d7734b27647d44376bebefb494a6af69fd5d443..0f24ae28f77d190299afcca43855f6f78f4d8a68 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_promo.h"
@@ -48,8 +49,9 @@ class OneClickTestProfileSyncService : public TestProfileSyncService {
// Helper routine to be used in conjunction with
// BrowserContextKeyedServiceFactory::SetTestingFactory().
- static KeyedService* Build(content::BrowserContext* profile) {
- return new OneClickTestProfileSyncService(static_cast<Profile*>(profile));
+ static scoped_ptr<KeyedService> Build(content::BrowserContext* profile) {
+ return make_scoped_ptr(
+ new OneClickTestProfileSyncService(static_cast<Profile*>(profile)));
}
bool FirstSetupInProgress() const override {
@@ -103,8 +105,8 @@ class TestOneClickSigninSyncObserver : public OneClickSigninSyncObserver {
};
// A trivial factory to build a null service.
-KeyedService* BuildNullService(content::BrowserContext* context) {
- return NULL;
+scoped_ptr<KeyedService> BuildNullService(content::BrowserContext* context) {
+ return nullptr;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698