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

Unified Diff: components/password_manager/core/browser/password_generation_manager_unittest.cc

Issue 2358723002: Convert FieldTrialList to Accept a std::unique_ptr (Closed)
Patch Set: Change Comment nullptr to null Created 4 years, 3 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/password_manager/core/browser/password_generation_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_generation_manager_unittest.cc b/components/password_manager/core/browser/password_generation_manager_unittest.cc
index 5a3aedc684e71628355a37a643d87d6bc800cc51..1ca939ab885baea53376ab728e0a33260afe154a 100644
--- a/components/password_manager/core/browser/password_generation_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_generation_manager_unittest.cc
@@ -8,6 +8,7 @@
#include <utility>
#include <vector>
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/strings/utf_string_conversions.h"
@@ -271,8 +272,8 @@ TEST_F(PasswordGenerationManagerTest, CheckIfFormClassifierShouldRun) {
std::unique_ptr<base::FieldTrialList> field_trial_list;
scoped_refptr<base::FieldTrial> field_trial;
if (is_autofill_field_metadata_enabled) {
- field_trial_list.reset(
- new base::FieldTrialList(new metrics::SHA1EntropyProvider("foo")));
+ field_trial_list.reset(new base::FieldTrialList(
+ base::MakeUnique<metrics::SHA1EntropyProvider>("foo")));
field_trial = base::FieldTrialList::CreateFieldTrial(
"AutofillFieldMetadata", "Enabled");
EXPECT_CALL(*GetTestDriver(), AllowToRunFormClassifier())

Powered by Google App Engine
This is Rietveld 408576698