diff options
Diffstat (limited to 'chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc')
-rw-r--r-- | chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc b/chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc index cf6e038164a..1ca421ec550 100644 --- a/chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc +++ b/chromium/components/safe_browsing/content/renderer/phishing_classifier/protobuf_scorer.cc @@ -41,7 +41,7 @@ ProtobufModelScorer::ProtobufModelScorer() = default; ProtobufModelScorer::~ProtobufModelScorer() = default; /* static */ -ProtobufModelScorer* ProtobufModelScorer::Create( +std::unique_ptr<ProtobufModelScorer> ProtobufModelScorer::Create( const base::StringPiece& model_str, base::File visual_tflite_model) { std::unique_ptr<ProtobufModelScorer> scorer(new ProtobufModelScorer()); @@ -86,7 +86,7 @@ ProtobufModelScorer* ProtobufModelScorer::Create( } RecordScorerCreationStatus(SCORER_SUCCESS); - return scorer.release(); + return scorer; } double ProtobufModelScorer::ComputeScore(const FeatureMap& features) const { @@ -127,6 +127,10 @@ int ProtobufModelScorer::model_version() const { return model_.version(); } +int ProtobufModelScorer::dom_model_version() const { + return model_.dom_model_version(); +} + bool Scorer::HasVisualTfLiteModel() const { return visual_tflite_model_.IsValid(); } |