chromium/components/assist_ranker/BUILD.gn

# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

static_library("assist_ranker") {
  sources = [
    "assist_ranker_service.h",
    "assist_ranker_service_impl.cc",
    "assist_ranker_service_impl.h",
    "base_predictor.cc",
    "base_predictor.h",
    "binary_classifier_predictor.cc",
    "binary_classifier_predictor.h",
    "classifier_predictor.cc",
    "classifier_predictor.h",
    "example_preprocessing.cc",
    "example_preprocessing.h",
    "generic_logistic_regression_inference.cc",
    "generic_logistic_regression_inference.h",
    "nn_classifier.cc",
    "nn_classifier.h",
    "predictor_config.cc",
    "predictor_config.h",
    "predictor_config_definitions.cc",
    "predictor_config_definitions.h",
    "quantized_nn_classifier.cc",
    "quantized_nn_classifier.h",
    "ranker_example_util.cc",
    "ranker_example_util.h",
    "ranker_model.cc",
    "ranker_model.h",
    "ranker_model_loader.h",
    "ranker_model_loader_impl.cc",
    "ranker_model_loader_impl.h",
    "ranker_url_fetcher.cc",
    "ranker_url_fetcher.h",
  ]

  deps = [
    "//base",
    "//components/assist_ranker/proto",
    "//components/keyed_service/core",
    "//net",
    "//services/metrics/public/cpp:metrics_cpp",
    "//services/network:network_service",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "base_predictor_unittest.cc",
    "binary_classifier_predictor_unittest.cc",
    "classifier_predictor_unittest.cc",
    "example_preprocessing_unittest.cc",
    "fake_ranker_model_loader.cc",
    "fake_ranker_model_loader.h",
    "generic_logistic_regression_inference_unittest.cc",
    "nn_classifier_test_util.cc",
    "nn_classifier_test_util.h",
    "nn_classifier_unittest.cc",
    "quantized_nn_classifier_unittest.cc",
    "ranker_example_util_unittest.cc",
    "ranker_model_loader_impl_unittest.cc",
    "ranker_model_unittest.cc",
  ]

  deps = [
    ":assist_ranker",
    "//base",
    "//components/assist_ranker/proto",
    "//components/ukm:test_support",
    "//net:test_support",
    "//services/network:test_support",
    "//services/network/public/cpp",
    "//testing/gtest",
  ]
}