| Index: extensions/browser/value_store/testing_value_store.cc
|
| diff --git a/extensions/browser/value_store/testing_value_store.cc b/extensions/browser/value_store/testing_value_store.cc
|
| index 5c719de30a4801320c0a3eac0e084651e414f1c1..039d6c8bbdef61acbb5d5260a95e5635db567a46 100644
|
| --- a/extensions/browser/value_store/testing_value_store.cc
|
| +++ b/extensions/browser/value_store/testing_value_store.cc
|
| @@ -57,7 +57,7 @@ ValueStore::ReadResult TestingValueStore::Get(
|
| it != keys.end(); ++it) {
|
| base::Value* value = NULL;
|
| if (storage_.GetWithoutPathExpansion(*it, &value)) {
|
| - settings->SetWithoutPathExpansion(*it, value->DeepCopy());
|
| + settings->SetWithoutPathExpansion(*it, value->CreateDeepCopy());
|
| }
|
| }
|
| return MakeReadResult(base::WrapUnique(settings), status_);
|
| @@ -67,13 +67,13 @@ ValueStore::ReadResult TestingValueStore::Get() {
|
| read_count_++;
|
| if (!status_.ok())
|
| return MakeReadResult(status_);
|
| - return MakeReadResult(base::WrapUnique(storage_.DeepCopy()), status_);
|
| + return MakeReadResult(storage_.CreateDeepCopy(), status_);
|
| }
|
|
|
| ValueStore::WriteResult TestingValueStore::Set(
|
| WriteOptions options, const std::string& key, const base::Value& value) {
|
| base::DictionaryValue settings;
|
| - settings.SetWithoutPathExpansion(key, value.DeepCopy());
|
| + settings.SetWithoutPathExpansion(key, value.CreateDeepCopy());
|
| return Set(options, settings);
|
| }
|
|
|
| @@ -89,12 +89,10 @@ ValueStore::WriteResult TestingValueStore::Set(
|
| base::Value* old_value = NULL;
|
| if (!storage_.GetWithoutPathExpansion(it.key(), &old_value) ||
|
| !old_value->Equals(&it.value())) {
|
| - changes->push_back(
|
| - ValueStoreChange(
|
| - it.key(),
|
| - old_value ? old_value->DeepCopy() : old_value,
|
| - it.value().DeepCopy()));
|
| - storage_.SetWithoutPathExpansion(it.key(), it.value().DeepCopy());
|
| + changes->push_back(ValueStoreChange(
|
| + it.key(), old_value ? old_value->CreateDeepCopy() : nullptr,
|
| + it.value().CreateDeepCopy()));
|
| + storage_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
|
| }
|
| }
|
| return MakeWriteResult(std::move(changes), status_);
|
| @@ -115,7 +113,7 @@ ValueStore::WriteResult TestingValueStore::Remove(
|
| it != keys.end(); ++it) {
|
| std::unique_ptr<base::Value> old_value;
|
| if (storage_.RemoveWithoutPathExpansion(*it, &old_value)) {
|
| - changes->push_back(ValueStoreChange(*it, old_value.release(), NULL));
|
| + changes->push_back(ValueStoreChange(*it, std::move(old_value), nullptr));
|
| }
|
| }
|
| return MakeWriteResult(std::move(changes), status_);
|
|
|