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

Unified Diff: components/keyed_service/content/browser_context_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/content/browser_context_keyed_service_factory.h
diff --git a/components/keyed_service/content/browser_context_keyed_service_factory.h b/components/keyed_service/content/browser_context_keyed_service_factory.h
index ca138af6f7a7fb1fd97b1919aac4df8b597a4750..a08bcf9eea26e01c3bffa6e4db93d973820c018c 100644
--- a/components/keyed_service/content/browser_context_keyed_service_factory.h
+++ b/components/keyed_service/content/browser_context_keyed_service_factory.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_H_
#define COMPONENTS_KEYED_SERVICE_CONTENT_BROWSER_CONTEXT_KEYED_SERVICE_FACTORY_H_
+#include <memory>
+
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "components/keyed_service/core/keyed_service_export.h"
@@ -40,8 +42,8 @@ class KEYED_SERVICE_EXPORT BrowserContextKeyedServiceFactory
// A function that supplies the instance of a KeyedService for a given
// BrowserContext. This is used primarily for testing, where we want to feed
// a specific mock into the BCKSF system.
- typedef scoped_ptr<KeyedService>(*TestingFactoryFunction)(
- content::BrowserContext* context);
+ using TestingFactoryFunction =
+ std::unique_ptr<KeyedService> (*)(content::BrowserContext* context);
// Associates |factory| with |context| so that |factory| is used to create
// the KeyedService when requested. |factory| can be NULL to signal that
@@ -130,7 +132,7 @@ class KEYED_SERVICE_EXPORT BrowserContextKeyedServiceFactory
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