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

Unified Diff: components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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: components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc
diff --git a/components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc b/components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc
index 0b6cc1a9ceaece09c75c8e0a53bbf0444a73d5bb..aeac80ffce9e664f8dc51119c2d618ebf04b7c86 100644
--- a/components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc
+++ b/components/sync/engine_impl/sync_encryption_handler_impl_unittest.cc
@@ -10,6 +10,7 @@
#include "base/base64.h"
#include "base/json/json_string_value_serializer.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/tracked_objects.h"
#include "components/sync/base/fake_encryptor.h"
@@ -95,9 +96,9 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
void SetUpEncryptionWithKeyForBootstrapping(
const std::string& key_for_bootstrapping) {
- encryption_handler_.reset(new SyncEncryptionHandlerImpl(
+ encryption_handler_ = base::MakeUnique<SyncEncryptionHandlerImpl>(
user_share(), &encryptor_, key_for_bootstrapping,
- std::string() /* keystore key for bootstrapping */));
+ std::string() /* keystore key for bootstrapping */);
encryption_handler_->AddObserver(&observer_);
}
« no previous file with comments | « components/sync/engine_impl/model_type_worker_unittest.cc ('k') | components/sync/engine_impl/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698