chromium/components/search/BUILD.gn

# Copyright 2014 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("search") {
  sources = [
    "ntp_features.cc",
    "ntp_features.h",
    "search.cc",
    "search.h",
    "search_provider_observer.cc",
    "search_provider_observer.h",
  ]

  deps = [
    "//base",
    "//components/search_engines",
  ]
}

static_library("start_suggest") {
  sources = [
    "start_suggest_service.cc",
    "start_suggest_service.h",
  ]

  deps = [
    ":search",
    "//base",
    "//components/google/core/common",
    "//components/history/core/browser",
    "//components/keyed_service/core",
    "//components/omnibox/browser",
    "//components/omnibox/browser:location_bar",
    "//components/search_engines",
    "//components/signin/public/identity_manager",
    "//net",
    "//services/data_decoder/public/cpp",
    "//services/network/public/cpp",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "search_unittest.cc",
    "start_suggest_service_unittest.cc",
  ]
  if (is_android) {
    sources += [ "search_android_unittest.cc" ]
  }

  deps = [
    ":search",
    ":start_suggest",
    "//base",
    "//base/test:test_support",
    "//components/omnibox/browser:test_support",
    "//components/search_engines:search_engines",
    "//components/search_engines:test_support",
    "//components/signin/public/base:test_support",
    "//components/signin/public/identity_manager:test_support",
    "//services/data_decoder/public/cpp:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}