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

Unified Diff: components/dom_distiller/core/distillable_page_detector.h

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/core/distillable_page_detector.h
diff --git a/components/dom_distiller/core/distillable_page_detector.h b/components/dom_distiller/core/distillable_page_detector.h
index 893945acc44edb3d9e66591f51f9f7ba35d1cf72..78efdd56e2b9dab079b56d10aedccd43fe73e227 100644
--- a/components/dom_distiller/core/distillable_page_detector.h
+++ b/components/dom_distiller/core/distillable_page_detector.h
@@ -5,10 +5,10 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLABLE_PAGE_DETECTOR_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DISTILLABLE_PAGE_DETECTOR_H_
+#include <memory>
#include <vector>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "components/dom_distiller/core/proto/adaboost.pb.h"
namespace dom_distiller {
@@ -22,7 +22,7 @@ class DistillablePageDetector {
static const DistillablePageDetector* GetDefault();
static const DistillablePageDetector* GetNewModel();
static const DistillablePageDetector* GetLongPageModel();
- explicit DistillablePageDetector(scoped_ptr<AdaBoostProto> proto);
+ explicit DistillablePageDetector(std::unique_ptr<AdaBoostProto> proto);
~DistillablePageDetector();
// Returns true if the model classifies the vector of features as a
@@ -32,7 +32,7 @@ class DistillablePageDetector {
double Score(const std::vector<double>& features) const;
double GetThreshold() const;
private:
- scoped_ptr<AdaBoostProto> proto_;
+ std::unique_ptr<AdaBoostProto> proto_;
double threshold_;
DISALLOW_COPY_AND_ASSIGN(DistillablePageDetector);
};
« no previous file with comments | « components/dom_distiller/core/article_attachments_data.cc ('k') | components/dom_distiller/core/distillable_page_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698