chromium/chrome/browser/ash/app_list/search/ranking/BUILD.gn

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

import("//build/config/chromeos/ui_mode.gni")
import("//third_party/protobuf/proto_library.gni")

assert(is_chromeos_ash)

proto_library("proto") {
  sources = [ "removed_results.proto" ]
}

static_library("ranking") {
  sources = [
    "answer_ranker.cc",
    "answer_ranker.h",
    "best_match_ranker.cc",
    "best_match_ranker.h",
    "constants.h",
    "continue_ranker.cc",
    "continue_ranker.h",
    "filtering_ranker.cc",
    "filtering_ranker.h",
    "ftrl_ranker.cc",
    "ftrl_ranker.h",
    "keyword_ranker.cc",
    "keyword_ranker.h",
    "launch_data.cc",
    "launch_data.h",
    "mrfu_ranker.cc",
    "mrfu_ranker.h",
    "query_highlighter.cc",
    "query_highlighter.h",
    "ranker.cc",
    "ranker.h",
    "ranker_manager.cc",
    "ranker_manager.h",
    "removed_results_ranker.cc",
    "removed_results_ranker.h",
    "score_normalizing_ranker.cc",
    "score_normalizing_ranker.h",
    "sorting.cc",
    "sorting.h",
    "util.cc",
    "util.h",
  ]

  public_deps = [ "//chrome/browser:browser_public_dependencies" ]

  deps = [
    ":proto",
    "//ash",
    "//ash/constants",
    "//ash/public/cpp",
    "//base",
    "//chrome/browser/ash/app_list/search/util",
    "//chrome/browser/ash/app_list/search/util:proto",
    "//chrome/browser/profiles:profile",
    "//chromeos/crosapi/mojom",
    "//components/omnibox/browser",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "answer_ranker_unittest.cc",
    "best_match_ranker_unittest.cc",
    "filtering_ranker_unittest.cc",
    "ftrl_ranker_unittest.cc",
    "keyword_ranker_unittest.cc",
    "mrfu_ranker_unittest.cc",
    "query_highlighter_unittest.cc",
    "removed_results_proto_unittest.cc",
    "removed_results_ranker_unittest.cc",
    "score_normalizing_ranker_unittest.cc",
  ]

  deps = [
    ":ranking",
    "//ash",
    "//ash/public/cpp",
    "//base",
    "//base/test:test_support",
    "//chrome/browser/ash/app_list/search",
    "//chrome/browser/ash/app_list/search/common",
    "//chrome/browser/ash/app_list/search/files",
    "//chrome/browser/ash/app_list/search/omnibox",
    "//chrome/browser/ash/app_list/search/ranking:proto",
    "//chrome/browser/ash/app_list/search/test:test_support",
    "//chrome/browser/ash/file_suggest",
    "//chrome/browser/ash/file_suggest:test_support",
    "//chrome/browser/ui",
    "//chrome/browser/ui:test_support",
    "//chrome/test:test_support",
    "//chromeos/crosapi/mojom",
    "//content/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}