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

Unified Diff: extensions/browser/value_store/test_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/test_value_store_factory.cc
diff --git a/extensions/browser/value_store/test_value_store_factory.cc b/extensions/browser/value_store/test_value_store_factory.cc
index f5135dfa16c1393789c73b8c7edfbcf0bcf569af..de75f953882f6a598c3bd6116849405e2a9b44db 100644
--- a/extensions/browser/value_store/test_value_store_factory.cc
+++ b/extensions/browser/value_store/test_value_store_factory.cc
@@ -4,6 +4,7 @@
#include "extensions/browser/value_store/test_value_store_factory.h"
+#include "base/memory/ptr_util.h"
#include "extensions/browser/value_store/leveldb_value_store.h"
#include "extensions/browser/value_store/testing_value_store.h"
@@ -101,15 +102,15 @@ TestValueStoreFactory::TestValueStoreFactory(const base::FilePath& db_path)
TestValueStoreFactory::~TestValueStoreFactory() {}
-scoped_ptr<ValueStore> TestValueStoreFactory::CreateRulesStore() {
+std::unique_ptr<ValueStore> TestValueStoreFactory::CreateRulesStore() {
if (db_path_.empty())
last_created_store_ = new TestingValueStore();
else
last_created_store_ = new LeveldbValueStore(kUMAClientName, db_path_);
- return make_scoped_ptr(last_created_store_);
+ return base::WrapUnique(last_created_store_);
}
-scoped_ptr<ValueStore> TestValueStoreFactory::CreateStateStore() {
+std::unique_ptr<ValueStore> TestValueStoreFactory::CreateStateStore() {
return CreateRulesStore();
}
@@ -129,11 +130,11 @@ TestValueStoreFactory::StorageHelper& TestValueStoreFactory::GetStorageHelper(
return local_helper_;
}
-scoped_ptr<ValueStore> TestValueStoreFactory::CreateSettingsStore(
+std::unique_ptr<ValueStore> TestValueStoreFactory::CreateSettingsStore(
SettingsNamespace settings_namespace,
ModelType model_type,
const ExtensionId& extension_id) {
- scoped_ptr<ValueStore> settings_store(CreateRulesStore());
+ std::unique_ptr<ValueStore> settings_store(CreateRulesStore());
// Note: This factory is purposely keeping the raw pointers to each ValueStore
// created. Tests using TestValueStoreFactory must be careful to keep
// those ValueStore's alive for the duration of their test.
« no previous file with comments | « extensions/browser/value_store/test_value_store_factory.h ('k') | extensions/browser/value_store/testing_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698