# Copyright 2026 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("sync_tab_context") {
  sources = [
    "container_id.h",
    "ephemeral_key_fetcher.h",
    "http_rpc_based_ephemeral_key_fetcher.cc",
    "http_rpc_based_ephemeral_key_fetcher.h",
    "http_rpc_constants.cc",
    "http_rpc_constants.h",
    "tab_context_container_sync_bridge.cc",
    "tab_context_container_sync_bridge.h",
    "tab_context_data_type_controller.cc",
    "tab_context_data_type_controller.h",
    "tab_context_item_sync_bridge.cc",
    "tab_context_item_sync_bridge.h",
    "tab_context_sync_service.cc",
    "tab_context_sync_service.h",
    "tab_context_sync_service_impl.cc",
    "tab_context_sync_service_impl.h",
  ]

  public_deps = [
    "//base",
    "//components/keyed_service/core",
    "//components/sync_tab_context/proto",
    "//url",
  ]

  deps = [
    "//components/signin/public/identity_manager",
    "//components/sync/model",
    "//components/sync/model/crypto",
    "//components/sync/protocol",
    "//components/sync/service",
    "//google_apis",
    "//net",
    "//services/network/public/cpp",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "http_rpc_based_ephemeral_key_fetcher_unittest.cc",
    "tab_context_container_sync_bridge_unittest.cc",
    "tab_context_data_type_controller_unittest.cc",
    "tab_context_item_sync_bridge_unittest.cc",
    "tab_context_sync_service_impl_unittest.cc",
  ]

  deps = [
    ":sync_tab_context",
    "//base",
    "//base/test:test_support",
    "//components/signin/public/identity_manager",
    "//components/signin/public/identity_manager:test_support",
    "//components/sync:test_support",
    "//components/sync/model",
    "//components/sync/protocol",
    "//components/sync/service",
    "//net",
    "//services/network:test_support",
    "//services/network/public/cpp",
    "//testing/gmock",
    "//testing/gtest",
  ]
}
