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

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

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 years, 8 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 b344833564560f82c98b8bdf9eb18abf61281873..273d9b43e27322efe8e6502edaa6a14ee7424c9a 100644
--- a/components/keyed_service/ios/browser_state_keyed_service_factory.h
+++ b/components/keyed_service/ios/browser_state_keyed_service_factory.h
@@ -5,9 +5,10 @@
#ifndef COMPONENTS_KEYED_SERVICE_IOS_BROWSER_STATE_KEYED_SERVICE_FACTORY_H_
#define COMPONENTS_KEYED_SERVICE_IOS_BROWSER_STATE_KEYED_SERVICE_FACTORY_H_
+#include <memory>
+
#include "base/compiler_specific.h"
#include "base/macros.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"
@@ -31,8 +32,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 scoped_ptr<KeyedService>(*TestingFactoryFunction)(
- web::BrowserState* context);
+ using TestingFactoryFunction =
+ std::unique_ptr<KeyedService> (*)(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
@@ -90,7 +91,7 @@ class KEYED_SERVICE_EXPORT BrowserStateKeyedServiceFactory
// All subclasses of BrowserStateKeyedServiceFactory must return a
// KeyedService instead of just a BrowserStateKeyedBase.
- virtual scoped_ptr<KeyedService> BuildServiceInstanceFor(
+ virtual std::unique_ptr<KeyedService> BuildServiceInstanceFor(
web::BrowserState* context) const = 0;
// A helper object actually listens for notifications about BrowserState
@@ -116,7 +117,7 @@ class KEYED_SERVICE_EXPORT BrowserStateKeyedServiceFactory
user_prefs::PrefRegistrySyncable* registry) {}
// KeyedServiceFactory:
- scoped_ptr<KeyedService> BuildServiceInstanceFor(
+ std::unique_ptr<KeyedService> BuildServiceInstanceFor(
base::SupportsUserData* context) const final;
bool IsOffTheRecord(base::SupportsUserData* context) const final;

Powered by Google App Engine
This is Rietveld 408576698