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

Unified Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 1880143002: Convert chrome/common 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: chrome/common/extensions/chrome_extensions_client.cc
diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc
index 81d942ba5e109aa31ca07556ffd433a22668d48c..14f7f88de594cfcc48b5dd01c1030694732bb07e 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -4,6 +4,8 @@
#include "chrome/common/extensions/chrome_extensions_client.h"
+#include <memory>
+
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/metrics/histogram_macros.h"
@@ -65,8 +67,8 @@ const char kThumbsWhiteListedExtension[] = "khopmbdjffemhegeeobelklnbglcdgfh";
template <class FeatureClass>
SimpleFeature* CreateFeature() {
SimpleFeature* feature = new FeatureClass;
- feature->AddFilter(
- scoped_ptr<SimpleFeatureFilter>(new ChromeChannelFeatureFilter(feature)));
+ feature->AddFilter(std::unique_ptr<SimpleFeatureFilter>(
+ new ChromeChannelFeatureFilter(feature)));
return feature;
}
@@ -142,10 +144,10 @@ const std::string ChromeExtensionsClient::GetProductName() {
return l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
}
-scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider(
+std::unique_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider(
const std::string& name) const {
- scoped_ptr<FeatureProvider> provider;
- scoped_ptr<JSONFeatureProviderSource> source(
+ std::unique_ptr<FeatureProvider> provider;
+ std::unique_ptr<JSONFeatureProviderSource> source(
CreateFeatureProviderSource(name));
if (name == "api") {
provider.reset(new BaseFeatureProvider(source->dictionary(),
@@ -165,10 +167,10 @@ scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider(
return provider;
}
-scoped_ptr<JSONFeatureProviderSource>
+std::unique_ptr<JSONFeatureProviderSource>
ChromeExtensionsClient::CreateFeatureProviderSource(
const std::string& name) const {
- scoped_ptr<JSONFeatureProviderSource> source(
+ std::unique_ptr<JSONFeatureProviderSource> source(
new JSONFeatureProviderSource(name));
if (name == "api") {
source->LoadJSON(IDR_EXTENSION_API_FEATURES);
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.h ('k') | chrome/common/extensions/chrome_extensions_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698