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

Unified Diff: components/variations/variations_seed_processor_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/variations/variations_seed_processor_unittest.cc
diff --git a/components/variations/variations_seed_processor_unittest.cc b/components/variations/variations_seed_processor_unittest.cc
index d1e9967a2e18767b6954923593a4ad4724ad7499..7703eed3b1ae1631c2f014239fc2d77dd575b1d3 100644
--- a/components/variations/variations_seed_processor_unittest.cc
+++ b/components/variations/variations_seed_processor_unittest.cc
@@ -17,6 +17,7 @@
#include "base/feature_list.h"
#include "base/format_macros.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -867,11 +868,8 @@ TEST_F(VariationsSeedProcessorTest, LowEntropyStudyTest) {
// An entorpy value of 0.1 will cause the AA group to be chosen, since AA is
// the only non-default group, and has a probability percent above 0.1.
- base::MockEntropyProvider* mock_high_entropy_provider =
- new base::MockEntropyProvider(0.1);
-
- // The field trial list takes ownership of the provider.
- base::FieldTrialList field_trial_list(mock_high_entropy_provider);
+ base::FieldTrialList field_trial_list(
+ base::MakeUnique<base::MockEntropyProvider>(0.1));
// Use a stack instance, since nothing takes ownership of this provider.
// This entropy value will cause the default group to be chosen since it's a
« no previous file with comments | « components/variations/entropy_provider_unittest.cc ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698