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

Unified Diff: components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc

Issue 1879613003: Convert //components/dom_distiller from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
diff --git a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
index 4ec50f72bd6ceb24de5186abc1e47634216048d2..99cee028959f980c8be433651c510759726ba5d2 100644
--- a/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
+++ b/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc
@@ -133,7 +133,7 @@ IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
TestIsDistillablePage) {
- scoped_ptr<AdaBoostProto> proto(new AdaBoostProto);
+ std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
proto->set_num_features(kDerivedFeaturesCount);
proto->set_num_stumps(1);
@@ -141,7 +141,7 @@ IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
stump->set_feature_number(0);
stump->set_weight(1);
stump->set_split(-1);
- scoped_ptr<DistillablePageDetector> detector(
+ std::unique_ptr<DistillablePageDetector> detector(
new DistillablePageDetector(std::move(proto)));
EXPECT_DOUBLE_EQ(0.5, detector->GetThreshold());
// The first value of the first feature is either 0 or 1. Since the stump's
@@ -158,14 +158,14 @@ IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
IN_PROC_BROWSER_TEST_F(DomDistillerDistillablePageUtilsTest,
TestIsNotDistillablePage) {
- scoped_ptr<AdaBoostProto> proto(new AdaBoostProto);
+ std::unique_ptr<AdaBoostProto> proto(new AdaBoostProto);
proto->set_num_features(kDerivedFeaturesCount);
proto->set_num_stumps(1);
StumpProto* stump = proto->add_stump();
stump->set_feature_number(0);
stump->set_weight(-1);
stump->set_split(-1);
- scoped_ptr<DistillablePageDetector> detector(
+ std::unique_ptr<DistillablePageDetector> detector(
new DistillablePageDetector(std::move(proto)));
EXPECT_DOUBLE_EQ(-0.5, detector->GetThreshold());
// The first value of the first feature is either 0 or 1. Since the stump's

Powered by Google App Engine
This is Rietveld 408576698