# Copyright 2020 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/chrome_build.gni")
assert(is_chromeos, "Nearby Share is CrOS only")
source_set("common") {
sources = [
"nearby_share_features.cc",
"nearby_share_features.h",
"nearby_share_prefs.cc",
"nearby_share_prefs.h",
"nearby_share_profile_info_provider.h",
"nearby_share_resource_getter.cc",
"nearby_share_resource_getter.h",
"nearby_share_switches.cc",
"nearby_share_switches.h",
]
public_deps = [ "//base" ]
deps = [
"//ash/constants",
"//build:branding_buildflags",
"//chrome/app:generated_resources",
"//chromeos/ash/services/nearby/public/mojom",
"//components/pref_registry",
"//components/prefs",
"//net",
"//services/network/public/cpp",
"//services/network/public/mojom",
"//ui/base",
]
if (is_chrome_branded) {
deps += [ "../internal:utils" ]
} else {
sources += [
"nearby_share_resource_utils.cc",
"nearby_share_resource_utils.h",
]
}
}
source_set("test_support") {
testonly = true
sources = [
"fake_nearby_share_profile_info_provider.cc",
"fake_nearby_share_profile_info_provider.h",
]
deps = [ ":common" ]
}
source_set("unit_tests") {
testonly = true
sources = [ "nearby_share_resource_getter_unittest.cc" ]
deps = [
":common",
":test_support",
"//base",
"//base/test:test_support",
"//build:branding_buildflags",
"//chrome/app:generated_resources",
]
}