# 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.

source_set("public") {
  sources = [
    "tips_manager.cc",
    "tips_manager.h",
  ]
  public_deps = [
    "//base",
    "//components/keyed_service/core",
  ]
  deps = [
    ":constants",
    ":signal_constants",
    "//components/pref_registry",
    "//components/prefs",
  ]
}

source_set("constants") {
  sources = [
    "constants.cc",
    "constants.h",
  ]
}

source_set("signal_constants") {
  sources = [ "signal_constants.h" ]
  public_deps = [ "//base" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "tips_manager_unittest.cc" ]
  deps = [
    ":constants",
    ":public",
    ":signal_constants",
    "//base",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/sync_preferences:test_support",
    "//testing/gtest",
  ]

  # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
  # enable the diagnostic by removing this line.
  configs += [ "//build/config/compiler:no_exit_time_destructors" ]
}
