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

Unified Diff: extensions/browser/value_store/legacy_value_store_factory.cc

Issue 2252373002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 e183af257a5d07d68f609f3089a1994dad42ef46..3bede532d4882123968d5dc7ab5460634b4970ce 100644
--- a/extensions/browser/value_store/legacy_value_store_factory.cc
+++ b/extensions/browser/value_store/legacy_value_store_factory.cc
@@ -168,13 +168,13 @@ bool LegacyValueStoreFactory::StateDBExists() const {
}
std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateRulesStore() {
- return base::WrapUnique(
- new LeveldbValueStore(kRulesDatabaseUMAClientName, GetRulesDBPath()));
+ return base::MakeUnique<LeveldbValueStore>(kRulesDatabaseUMAClientName,
+ GetRulesDBPath());
}
std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateStateStore() {
- return base::WrapUnique(
- new LeveldbValueStore(kStateDatabaseUMAClientName, GetStateDBPath()));
+ return base::MakeUnique<LeveldbValueStore>(kStateDatabaseUMAClientName,
+ GetStateDBPath());
}
std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateSettingsStore(
@@ -184,8 +184,8 @@ std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateSettingsStore(
const ModelSettings* settings_root =
GetSettingsRoot(settings_namespace).GetModel(model_type);
DCHECK(settings_root != nullptr);
- return base::WrapUnique(new LeveldbValueStore(
- kSettingsDatabaseUMAClientName, settings_root->GetDBPath(extension_id)));
+ return base::MakeUnique<LeveldbValueStore>(
+ kSettingsDatabaseUMAClientName, settings_root->GetDBPath(extension_id));
}
void LegacyValueStoreFactory::DeleteSettings(
« no previous file with comments | « extensions/browser/user_script_loader.cc ('k') | extensions/browser/value_store/value_store_change_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698