chromium/chromeos/ash/components/browser_context_helper/BUILD.gn

# Copyright 2022 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")

assert(is_chromeos_ash, "Non ChromeOS builds must not depend on //chromeos/ash")

component("browser_context_helper") {
  defines = [ "IS_ASH_BROWSER_CONTEXT_HELPER_IMPL" ]
  deps = [
    "//ash/constants",
    "//base",
    "//components/account_id",
    "//components/user_manager",
    "//content/public/browser",
  ]
  sources = [
    "annotated_account_id.cc",
    "annotated_account_id.h",
    "browser_context_flusher.cc",
    "browser_context_flusher.h",
    "browser_context_helper.cc",
    "browser_context_helper.h",
    "browser_context_types.cc",
    "browser_context_types.h",
    "file_flusher.cc",
    "file_flusher.h",
  ]
}

source_set("test_support") {
  testonly = true
  deps = [
    ":browser_context_helper",
    "//base",
    "//content/public/browser",
    "//content/test:test_support",
  ]
  sources = [
    "fake_browser_context_helper_delegate.cc",
    "fake_browser_context_helper_delegate.h",
  ]
}

source_set("unit_tests") {
  testonly = true
  deps = [
    ":browser_context_helper",
    ":test_support",
    "//ash/constants",
    "//base/test:test_support",
    "//components/account_id",
    "//components/user_manager",
    "//components/user_manager:test_support",
    "//content/test:test_support",
  ]
  sources = [
    "browser_context_helper_unittest.cc",
    "browser_context_types_unittest.cc",
    "file_flusher_unittest.cc",
  ]
}