| Index: net/sdch/sdch_owner_unittest.cc
|
| diff --git a/net/sdch/sdch_owner_unittest.cc b/net/sdch/sdch_owner_unittest.cc
|
| index 788a9929b6f39e9760a4aa835013553aa214df92..1abe682cb4a3ab6cf6caaf909c9ae21820c8ea65 100644
|
| --- a/net/sdch/sdch_owner_unittest.cc
|
| +++ b/net/sdch/sdch_owner_unittest.cc
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include <utility>
|
| +
|
| #include "base/memory/memory_pressure_listener.h"
|
| #include "base/prefs/testing_pref_store.h"
|
| #include "base/run_loop.h"
|
| @@ -774,7 +776,7 @@ TEST_F(SdchOwnerPersistenceTest, Empty) {
|
|
|
| // Test a persistence store with an empty dictionary.
|
| TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDict) {
|
| - pref_store_->SetValue("SDCH", new base::DictionaryValue(),
|
| + pref_store_->SetValue("SDCH", make_scoped_ptr(new base::DictionaryValue()),
|
| WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
| ResetOwner(false);
|
| EXPECT_EQ(0, owner_->GetDictionaryCountForTesting());
|
| @@ -782,9 +784,9 @@ TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDict) {
|
|
|
| // Test a persistence store with a bad version number.
|
| TEST_F(SdchOwnerPersistenceTest, Persistent_BadVersion) {
|
| - base::DictionaryValue* sdch_dict = new base::DictionaryValue();
|
| + scoped_ptr<base::DictionaryValue> sdch_dict(new base::DictionaryValue());
|
| sdch_dict->SetInteger("version", 2);
|
| - pref_store_->SetValue("SDCH", sdch_dict,
|
| + pref_store_->SetValue("SDCH", std::move(sdch_dict),
|
| WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
|
|
| ResetOwner(false);
|
| @@ -793,11 +795,11 @@ TEST_F(SdchOwnerPersistenceTest, Persistent_BadVersion) {
|
|
|
| // Test a persistence store with an empty dictionaries map.
|
| TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDictList) {
|
| - base::DictionaryValue* sdch_dict = new base::DictionaryValue();
|
| + scoped_ptr<base::DictionaryValue> sdch_dict(new base::DictionaryValue());
|
| scoped_ptr<base::DictionaryValue> dicts(new base::DictionaryValue());
|
| sdch_dict->SetInteger("version", 1);
|
| sdch_dict->Set("dictionaries", dicts.Pass());
|
| - pref_store_->SetValue("SDCH", sdch_dict,
|
| + pref_store_->SetValue("SDCH", std::move(sdch_dict),
|
| WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
|
|
| ResetOwner(false);
|
|
|