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: extensions/browser/value_store/legacy_value_store_factory.cc

Issue 1909773002: Convert //extensions/browser 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: extensions/browser/value_store/legacy_value_store_factory.cc
diff --git a/extensions/browser/value_store/legacy_value_store_factory.cc b/extensions/browser/value_store/legacy_value_store_factory.cc
index bafb93ee2a3aa58263bd1e96e74b0fd91b8acb0f..d4f054532b9487c965d546d7694ee4b103717c78 100644
--- a/extensions/browser/value_store/legacy_value_store_factory.cc
+++ b/extensions/browser/value_store/legacy_value_store_factory.cc
@@ -8,6 +8,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/value_store/leveldb_value_store.h"
#include "extensions/common/constants.h"
@@ -167,24 +168,24 @@ bool LegacyValueStoreFactory::StateDBExists() const {
return ValidDBExists(GetStateDBPath());
}
-scoped_ptr<ValueStore> LegacyValueStoreFactory::CreateRulesStore() {
- return make_scoped_ptr(
+std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateRulesStore() {
+ return base::WrapUnique(
new LeveldbValueStore(kRulesDatabaseUMAClientName, GetRulesDBPath()));
}
-scoped_ptr<ValueStore> LegacyValueStoreFactory::CreateStateStore() {
- return make_scoped_ptr(
+std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateStateStore() {
+ return base::WrapUnique(
new LeveldbValueStore(kStateDatabaseUMAClientName, GetStateDBPath()));
}
-scoped_ptr<ValueStore> LegacyValueStoreFactory::CreateSettingsStore(
+std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateSettingsStore(
settings_namespace::Namespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) {
const ModelSettings* settings_root =
GetSettingsRoot(settings_namespace).GetModel(model_type);
DCHECK(settings_root != nullptr);
- return make_scoped_ptr(new LeveldbValueStore(
+ return base::WrapUnique(new LeveldbValueStore(
kSettingsDatabaseUMAClientName, settings_root->GetDBPath(extension_id)));
}
« no previous file with comments | « extensions/browser/value_store/legacy_value_store_factory.h ('k') | extensions/browser/value_store/leveldb_scoped_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698