1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//components/optimization_guide/features.gni")
static_library("history_embeddings") {
sources = [
"answerer.cc",
"answerer.h",
"history_embeddings_features.cc",
"history_embeddings_features.h",
"history_embeddings_service.cc",
"history_embeddings_service.h",
"intent_classifier.h",
"ml_answerer.cc",
"ml_answerer.h",
"ml_intent_classifier.cc",
"ml_intent_classifier.h",
"mock_answerer.cc",
"mock_answerer.h",
"mock_intent_classifier.cc",
"mock_intent_classifier.h",
"passages_util.cc",
"passages_util.h",
"sql_database.cc",
"sql_database.h",
"vector_database.cc",
"vector_database.h",
]
deps = [
"//base",
"//components/history/core/browser",
"//components/history_embeddings/core",
"//components/history_embeddings/proto:history_embeddings_proto",
"//components/keyed_service/core",
"//components/optimization_guide/core",
"//components/optimization_guide/proto:optimization_guide_proto",
"//components/os_crypt/async/browser",
"//components/page_content_annotations/core",
"//components/passage_embeddings",
"//services/passage_embeddings/public/mojom",
"//sql",
"//third_party/farmhash",
"//third_party/zlib/google:compression_utils",
"//url",
]
}
source_set("test_support") {
testonly = true
sources = [
"mock_history_embeddings_service.cc",
"mock_history_embeddings_service.h",
]
deps = [
":history_embeddings",
"//base/test:test_support",
"//components/history/core/browser",
"//components/passage_embeddings",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"history_embeddings_service_unittest.cc",
"passages_util_unittest.cc",
"search_strings_update_listener_unittest.cc",
"sql_database_unittest.cc",
"vector_database_unittest.cc",
]
if (build_with_model_execution) {
sources += [
"ml_answerer_unittest.cc",
"ml_intent_classifier_unittest.cc",
]
}
deps = [
":history_embeddings",
":test_support",
"//base/test:test_support",
"//components/history/core/browser",
"//components/history/core/test",
"//components/history_embeddings/core",
"//components/history_embeddings/proto:history_embeddings_proto",
"//components/optimization_guide/core",
"//components/optimization_guide/core:test_support",
"//components/optimization_guide/proto:optimization_guide_proto",
"//components/os_crypt/async/browser:test_support",
"//components/page_content_annotations/core:test_support",
"//components/passage_embeddings",
"//components/passage_embeddings:test_support",
"//components/prefs:test_support",
"//mojo/public/cpp/bindings",
"//services/passage_embeddings/public/mojom",
"//testing/gtest",
]
data = [ "//components/test/data/history_embeddings/" ]
if (is_ios) {
deps += [ "//components/test:history_embeddings_test_bundle_data" ]
}
}
|