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

Unified Diff: components/keyed_service/ios/browser_state_keyed_service_factory.h

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: components/keyed_service/ios/browser_state_keyed_service_factory.h
diff --git a/components/keyed_service/ios/browser_state_keyed_service_factory.h b/components/keyed_service/ios/browser_state_keyed_service_factory.h
index 7341aa19a09eba57ead52ea721f1a11dee61877c..69f28fd18e04b777d923b86bc5f759d400b5b86e 100644
--- a/components/keyed_service/ios/browser_state_keyed_service_factory.h
+++ b/components/keyed_service/ios/browser_state_keyed_service_factory.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
#include "components/keyed_service/core/keyed_service_export.h"
#include "components/keyed_service/core/keyed_service_factory.h"
@@ -30,7 +31,8 @@ class KEYED_SERVICE_EXPORT BrowserStateKeyedServiceFactory
// A function that supplies the instance of a KeyedService for a given
// BrowserState. This is used primarily for testing, where we want to feed
// a specific mock into the BSKSF system.
- typedef KeyedService* (*TestingFactoryFunction)(web::BrowserState* context);
+ typedef scoped_ptr<KeyedService>(*TestingFactoryFunction)(
+ web::BrowserState* context);
// Associates |factory| with |context| so that |factory| is used to create
// the KeyedService when requested. |factory| can be NULL to signal that
@@ -114,7 +116,7 @@ class KEYED_SERVICE_EXPORT BrowserStateKeyedServiceFactory
user_prefs::PrefRegistrySyncable* registry) {}
// KeyedServiceFactory:
- KeyedService* BuildServiceInstanceFor(
+ scoped_ptr<KeyedService> BuildServiceInstanceFor(
base::SupportsUserData* context) const final;
bool IsOffTheRecord(base::SupportsUserData* context) const final;

Powered by Google App Engine
This is Rietveld 408576698