Index: net/extras/sqlite/sqlite_channel_id_store_unittest.cc |
diff --git a/net/extras/sqlite/sqlite_channel_id_store_unittest.cc b/net/extras/sqlite/sqlite_channel_id_store_unittest.cc |
index f3c5f9bf8c2cd5cfb5eaa5bc0106673c0982ad33..ee3623c5bdaeb2de46094ca8b7ccc99699b94936 100644 |
--- a/net/extras/sqlite/sqlite_channel_id_store_unittest.cc |
+++ b/net/extras/sqlite/sqlite_channel_id_store_unittest.cc |
@@ -66,8 +66,8 @@ class SQLiteChannelIDStoreTest : public testing::Test { |
ASSERT_TRUE(asn1::ExtractSPKIFromDERCert(*cert_data, &spki)); |
std::vector<uint8_t> public_key(spki.size()); |
memcpy(public_key.data(), spki.data(), spki.size()); |
- key->reset(crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo( |
- ChannelIDService::kEPKIPassword, private_key, public_key)); |
+ *key = crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo( |
+ ChannelIDService::kEPKIPassword, private_key, public_key); |
} |
static base::Time GetTestCertExpirationTime() { |
@@ -111,10 +111,9 @@ class SQLiteChannelIDStoreTest : public testing::Test { |
Load(&channel_ids); |
ASSERT_EQ(0u, channel_ids.size()); |
// Make sure the store gets written at least once. |
- google_key_.reset(crypto::ECPrivateKey::Create()); |
+ google_key_ = crypto::ECPrivateKey::Create(); |
store_->AddChannelID(DefaultChannelIDStore::ChannelID( |
- "google.com", base::Time::FromInternalValue(1), |
- base::WrapUnique(google_key_->Copy()))); |
+ "google.com", base::Time::FromInternalValue(1), google_key_->Copy())); |
} |
base::ScopedTempDir temp_dir_; |
@@ -127,8 +126,7 @@ class SQLiteChannelIDStoreTest : public testing::Test { |
TEST_F(SQLiteChannelIDStoreTest, TestPersistence) { |
std::unique_ptr<crypto::ECPrivateKey> foo_key(crypto::ECPrivateKey::Create()); |
store_->AddChannelID(DefaultChannelIDStore::ChannelID( |
- "foo.com", base::Time::FromInternalValue(3), |
- base::WrapUnique(foo_key->Copy()))); |
+ "foo.com", base::Time::FromInternalValue(3), foo_key->Copy())); |
std::vector<std::unique_ptr<DefaultChannelIDStore::ChannelID>> channel_ids; |
// Replace the store effectively destroying the current one and forcing it |
@@ -184,7 +182,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestPersistence) { |
TEST_F(SQLiteChannelIDStoreTest, TestDeleteAll) { |
store_->AddChannelID(DefaultChannelIDStore::ChannelID( |
"foo.com", base::Time::FromInternalValue(3), |
- base::WrapUnique(crypto::ECPrivateKey::Create()))); |
+ crypto::ECPrivateKey::Create())); |
std::vector<std::unique_ptr<DefaultChannelIDStore::ChannelID>> channel_ids; |
// Replace the store effectively destroying the current one and forcing it |