| Index: components/dom_distiller/core/distillable_page_detector.cc
|
| diff --git a/components/dom_distiller/core/distillable_page_detector.cc b/components/dom_distiller/core/distillable_page_detector.cc
|
| index c3a333eaa8c9e4fef4bd14112008f501a4783ca9..5c2a7ee0125178ee53b7d6f8c547a1e38fb94c26 100644
|
| --- a/components/dom_distiller/core/distillable_page_detector.cc
|
| +++ b/components/dom_distiller/core/distillable_page_detector.cc
|
| @@ -41,6 +41,20 @@ const DistillablePageDetector* DistillablePageDetector::GetNewModel() {
|
| return detector;
|
| }
|
|
|
| +const DistillablePageDetector* DistillablePageDetector::GetLongPageModel() {
|
| + static DistillablePageDetector* detector = nullptr;
|
| + if (!detector) {
|
| + std::string serialized_proto =
|
| + ResourceBundle::GetSharedInstance()
|
| + .GetRawDataResource(IDR_LONG_PAGE_SERIALIZED_MODEL)
|
| + .as_string();
|
| + scoped_ptr<AdaBoostProto> proto(new AdaBoostProto);
|
| + CHECK(proto->ParseFromString(serialized_proto));
|
| + detector = new DistillablePageDetector(std::move(proto));
|
| + }
|
| + return detector;
|
| +}
|
| +
|
| DistillablePageDetector::DistillablePageDetector(
|
| scoped_ptr<AdaBoostProto> proto)
|
| : proto_(std::move(proto)), threshold_(0.0) {
|
|
|