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

Unified Diff: chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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: chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc b/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
index ca4aad9ab2e16c745acefc2b2b9eb225719fa65d..26002a4ad1dce3575bec908b7e79200d5d7359ac 100644
--- a/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
@@ -52,7 +52,7 @@ class MetricsReportingHandlerTest : public testing::Test {
EXPECT_TRUE(test_web_ui()->call_data().empty());
base::ListValue args;
- args.Append(base::WrapUnique(new base::FundamentalValue(1)));
+ args.Append(base::MakeUnique<base::FundamentalValue>(1));
handler()->HandleGetMetricsReporting(&args);
EXPECT_TRUE(handler()->IsJavascriptAllowed());
@@ -106,11 +106,9 @@ TEST_F(MetricsReportingHandlerTest, PrefChangesNotifyPage) {
TEST_F(MetricsReportingHandlerTest, PolicyChangesNotifyPage) {
// Change the policy, check that the page was notified.
map()->Set(policy::key::kMetricsReportingEnabled,
- policy::POLICY_LEVEL_MANDATORY,
- policy::POLICY_SCOPE_USER,
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
policy::POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(true)),
- nullptr);
+ base::MakeUnique<base::FundamentalValue>(true), nullptr);
provider()->UpdateChromePolicy(*map());
EXPECT_EQ(1u, test_web_ui()->call_data().size());
@@ -119,11 +117,9 @@ TEST_F(MetricsReportingHandlerTest, PolicyChangesNotifyPage) {
// Policies changing while JavaScript is disabled shouldn't notify the page.
map()->Set(policy::key::kMetricsReportingEnabled,
- policy::POLICY_LEVEL_MANDATORY,
- policy::POLICY_SCOPE_USER,
+ policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER,
policy::POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(false)),
- nullptr);
+ base::MakeUnique<base::FundamentalValue>(false), nullptr);
provider()->UpdateChromePolicy(*map());
EXPECT_TRUE(test_web_ui()->call_data().empty());
}

Powered by Google App Engine
This is Rietveld 408576698