1 // Copyright 2022 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 #include "components/browsing_topics/candidate_topic.h"
7 namespace browsing_topics {
10 CandidateTopic CandidateTopic::Create(Topic topic,
12 bool should_be_filtered,
15 int64_t model_version) {
16 DCHECK_NE(topic, Topic(0));
18 return CandidateTopic(topic, is_true_topic, should_be_filtered,
19 config_version, taxonomy_version, model_version);
23 CandidateTopic CandidateTopic::CreateInvalid() {
24 return CandidateTopic(Topic(0), /*is_true_topic=*/false,
25 /*should_be_filtered=*/false,
27 /*taxonomy_version=*/0,
31 CandidateTopic::CandidateTopic(Topic topic,
33 bool should_be_filtered,
36 int64_t model_version)
38 is_true_topic_(is_true_topic),
39 should_be_filtered_(should_be_filtered),
40 config_version_(config_version),
41 taxonomy_version_(taxonomy_version),
42 model_version_(model_version) {}
44 } // namespace browsing_topics