1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_BROWSING_TOPICS_ANNOTATOR_NOOP_H_
6 #define COMPONENTS_BROWSING_TOPICS_ANNOTATOR_NOOP_H_
8 #include "components/browsing_topics/annotator.h"
10 namespace browsing_topics {
12 // A no-op annotator when TFLite is not available by buildflag.
13 class AnnotatorNoOp : public Annotator {
15 using BatchAnnotationCallback =
16 base::OnceCallback<void(const std::vector<Annotation>&)>;
19 ~AnnotatorNoOp() override;
22 void BatchAnnotate(BatchAnnotationCallback callback,
23 const std::vector<std::string>& inputs) override;
24 void NotifyWhenModelAvailable(base::OnceClosure callback) override;
25 absl::optional<optimization_guide::ModelInfo> GetBrowsingTopicsModelInfo()
29 } // namespace browsing_topics
31 #endif // COMPONENTS_BROWSING_TOPICS_ANNOTATOR_NOOP_H_