# 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("//mojo/public/tools/bindings/mojom.gni")
source_set("indexed_db") {
public = [ "indexed_db_control_wrapper.h" ]
sources = [
"file_path_util.cc",
"file_path_util.h",
"file_stream_reader_to_data_pipe.cc",
"file_stream_reader_to_data_pipe.h",
"indexed_db_active_blob_registry.cc",
"indexed_db_active_blob_registry.h",
"indexed_db_backing_store.cc",
"indexed_db_backing_store.h",
"indexed_db_bucket_context.cc",
"indexed_db_bucket_context.h",
"indexed_db_bucket_context_handle.cc",
"indexed_db_bucket_context_handle.h",
"indexed_db_callback_helpers.h",
"indexed_db_compaction_task.cc",
"indexed_db_compaction_task.h",
"indexed_db_connection.cc",
"indexed_db_connection.h",
"indexed_db_connection_coordinator.cc",
"indexed_db_connection_coordinator.h",
"indexed_db_context_impl.cc",
"indexed_db_context_impl.h",
"indexed_db_control_wrapper.cc",
"indexed_db_cursor.cc",
"indexed_db_cursor.h",
"indexed_db_data_format_version.cc",
"indexed_db_data_format_version.h",
"indexed_db_data_loss_info.h",
"indexed_db_database.cc",
"indexed_db_database.h",
"indexed_db_database_callbacks.cc",
"indexed_db_database_callbacks.h",
"indexed_db_database_error.cc",
"indexed_db_database_error.h",
"indexed_db_external_object.cc",
"indexed_db_external_object.h",
"indexed_db_external_object_storage.cc",
"indexed_db_external_object_storage.h",
"indexed_db_factory_client.cc",
"indexed_db_factory_client.h",
"indexed_db_index_writer.cc",
"indexed_db_index_writer.h",
"indexed_db_leveldb_coding.cc",
"indexed_db_leveldb_coding.h",
"indexed_db_leveldb_operations.cc",
"indexed_db_leveldb_operations.h",
"indexed_db_lock_request_data.cc",
"indexed_db_lock_request_data.h",
"indexed_db_pending_connection.cc",
"indexed_db_pending_connection.h",
"indexed_db_pre_close_task_queue.cc",
"indexed_db_pre_close_task_queue.h",
"indexed_db_reporting.cc",
"indexed_db_reporting.h",
"indexed_db_return_value.cc",
"indexed_db_return_value.h",
"indexed_db_task_helper.h",
"indexed_db_tombstone_sweeper.cc",
"indexed_db_tombstone_sweeper.h",
"indexed_db_transaction.cc",
"indexed_db_transaction.h",
"indexed_db_value.cc",
"indexed_db_value.h",
"list_set.h",
"mock_browsertest_indexed_db_class_factory.cc",
"mock_browsertest_indexed_db_class_factory.h",
]
deps = [
"//base",
"//components/services/storage",
"//components/services/storage/public/cpp",
"//components/services/storage/public/mojom",
"//content:export",
"//content/public/common:common_sources",
"//net",
"//storage/browser",
"//third_party/blink/public/common",
"//third_party/leveldatabase",
"//third_party/zlib/google:zip",
"//v8:v8_version",
]
configs += [ "//content:content_implementation" ]
friend = [
":unit_tests",
"//content/test/*",
]
}
source_set("unit_tests") {
testonly = true
# See content_unittests for justification.
if (is_component_build) {
check_includes = false
}
sources = [
"indexed_db_active_blob_registry_unittest.cc",
"indexed_db_backing_store_unittest.cc",
"indexed_db_bucket_context_unittest.cc",
"indexed_db_cleanup_on_io_error_unittest.cc",
"indexed_db_context_unittest.cc",
"indexed_db_database_unittest.cc",
"indexed_db_fake_backing_store.cc",
"indexed_db_fake_backing_store.h",
"indexed_db_leveldb_coding_unittest.cc",
"indexed_db_pre_close_task_queue_unittest.cc",
"indexed_db_quota_client_unittest.cc",
"indexed_db_tombstone_sweeper_unittest.cc",
"indexed_db_transaction_unittest.cc",
"indexed_db_unittest.cc",
"list_set_unittest.cc",
"mock_indexed_db_factory_client.cc",
"mock_indexed_db_factory_client.h",
"mock_mojo_indexed_db_database_callbacks.cc",
"mock_mojo_indexed_db_database_callbacks.h",
"mock_mojo_indexed_db_factory_client.cc",
"mock_mojo_indexed_db_factory_client.h",
]
deps = [
"//base",
"//base/test:test_support",
"//components/services/storage",
"//components/services/storage:test_support",
"//components/services/storage/privileged/mojom",
"//components/services/storage/public/cpp",
"//components/services/storage/public/mojom",
"//content/public/common",
# This dependency is here to satisfy `gn check` given this target's includes
# of :indexed_db headers. This has to be done through //content/browser to
# avoid doubling symbols.
"//content/browser:for_content_tests",
"//storage/browser",
"//storage/browser:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/public/common",
"//third_party/leveldatabase",
]
}
mojom("internals_mojo_bindings") {
sources = [ "indexed_db_internals.mojom" ]
public_deps = [
"//components/services/storage/privileged/mojom",
"//components/services/storage/public/mojom",
"//mojo/public/mojom/base",
]
webui_module_path = "/"
generate_java = false
}