OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/dom_distiller/core/distillable_page_detector.h" | 5 #include "components/dom_distiller/core/distillable_page_detector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "grit/components_resources.h" | 11 #include "components/grit/components_resources.h" |
12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
13 | 13 |
14 namespace dom_distiller { | 14 namespace dom_distiller { |
15 | 15 |
16 const DistillablePageDetector* DistillablePageDetector::GetDefault() { | 16 const DistillablePageDetector* DistillablePageDetector::GetDefault() { |
17 static DistillablePageDetector* detector = nullptr; | 17 static DistillablePageDetector* detector = nullptr; |
18 if (!detector) { | 18 if (!detector) { |
19 std::string serialized_proto = | 19 std::string serialized_proto = |
20 ResourceBundle::GetSharedInstance() | 20 ResourceBundle::GetSharedInstance() |
21 .GetRawDataResource(IDR_DISTILLABLE_PAGE_SERIALIZED_MODEL) | 21 .GetRawDataResource(IDR_DISTILLABLE_PAGE_SERIALIZED_MODEL) |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 } | 89 } |
90 return score; | 90 return score; |
91 } | 91 } |
92 | 92 |
93 double DistillablePageDetector::GetThreshold() const { | 93 double DistillablePageDetector::GetThreshold() const { |
94 return threshold_; | 94 return threshold_; |
95 } | 95 } |
96 | 96 |
97 } // namespace dom_distiller | 97 } // namespace dom_distiller |
OLD | NEW |