0

sql: Assorted IWYU fixes

This CL also adds IWYU annotations to third_party/sqlite/sqlite3.h so
other files that include it will not see spurious IWYU warnings.

Change-Id: I30cd3f06dd8e9c805dd35a858f666911853325e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5555205
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305306}
This commit is contained in:
Dan McArdle
2024-05-23 20:24:31 +00:00
committed by Chromium LUCI CQ
parent 56fac3cec0
commit b52665ca6b
18 changed files with 35 additions and 23 deletions

@ -9,13 +9,14 @@
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <cinttypes>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
@ -40,6 +41,7 @@
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/threading/scoped_blocking_call.h"
#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
#include "base/tracing/protos/chrome_track_event.pbzero.h" // IWYU pragma: keep
@ -54,6 +56,7 @@
#include "sql/statement.h"
#include "sql/statement_id.h"
#include "sql/transaction.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_proto.h"
#include "third_party/sqlite/sqlite3.h"
#if BUILDFLAG(IS_WIN)

@ -16,25 +16,29 @@
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/component_export.h"
#include "base/containers/flat_map.h"
#include "base/dcheck_is_on.h"
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/gtest_prod_util.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/thread_annotations.h"
#include "base/threading/scoped_blocking_call.h"
#include "base/time/time.h"
#include "base/types/pass_key.h"
#include "sql/internal_api_token.h"
#include "sql/sql_features.h"
#include "sql/sqlite_result_code.h"
#include "sql/sqlite_result_code_values.h"
#include "sql/statement_id.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_proto.h"
// Forward declaration for SQLite structures. Headers in the public sql:: API
// must NOT include sqlite3.h.

@ -7,7 +7,6 @@
#include <inttypes.h>
#include <cstdint>
#include <ostream> // Needed to compile NOTREACHED() with operator <<.
#include <string>
#include "base/check_op.h"

@ -20,13 +20,17 @@
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/sequence_checker.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/gtest_util.h"

@ -6,11 +6,8 @@
#include <stddef.h>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"

@ -7,7 +7,7 @@
#include <stddef.h>
#include <memory>
#include <string>
#include "base/component_export.h"
#include "base/memory/raw_ptr.h"

@ -7,7 +7,6 @@
#include <stddef.h>
#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
#include <utility>

@ -5,8 +5,6 @@
#ifndef SQL_SANDBOXED_VFS_H_
#define SQL_SANDBOXED_VFS_H_
#include <stdint.h>
#include <memory>
#include <optional>

@ -5,6 +5,7 @@
#ifndef SQL_SANDBOXED_VFS_FILE_H_
#define SQL_SANDBOXED_VFS_FILE_H_
#include "base/dcheck_is_on.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/memory/raw_ptr.h"

@ -5,10 +5,16 @@
#ifndef SQL_SQL_MEMORY_DUMP_PROVIDER_H_
#define SQL_SQL_MEMORY_DUMP_PROVIDER_H_
#include <cstdint>
#include "base/component_export.h"
#include "base/memory/singleton.h"
#include "base/trace_event/memory_dump_provider.h"
namespace base::trace_event {
struct MemoryDumpArgs;
}
namespace sql {
// Adds process-wide memory usage statistics about sqlite to chrome://tracing.

@ -9,7 +9,6 @@
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include "base/check_op.h"
#include "base/dcheck_is_on.h"

@ -14,7 +14,7 @@
#include "base/component_export.h"
#include "base/containers/span.h"
#include "base/dcheck_is_on.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"

@ -5,8 +5,8 @@
#ifndef SQL_TRANSACTION_H_
#define SQL_TRANSACTION_H_
#include "base/check.h"
#include "base/component_export.h"
#include "base/dcheck_is_on.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/thread_annotations.h"

@ -10,7 +10,6 @@
#include "sql/database.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/sqlite/sqlite3.h"
namespace sql {

@ -4,19 +4,17 @@
#include "sql/vfs_wrapper.h"
#include <algorithm>
#include <cstring>
#include <functional>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/debug/leak_annotations.h"
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "third_party/sqlite/sqlite3.h"
#if BUILDFLAG(IS_APPLE)
#include "base/apple/backup_util.h"

@ -5,12 +5,14 @@
#ifndef SQL_VFS_WRAPPER_H_
#define SQL_VFS_WRAPPER_H_
#include <string>
#include "base/memory/raw_ptr_exclusion.h"
#include "build/build_config.h"
#include "third_party/sqlite/sqlite3.h"
#if BUILDFLAG(IS_FUCHSIA)
#include <string>
#endif
namespace sql {
static constexpr char kVfsWrapperName[] = "VFSWrapper";

@ -4,16 +4,19 @@
#include "sql/vfs_wrapper_fuchsia.h"
#include <string>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/fixed_flat_set.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/synchronization/lock.h"
#include "base/thread_annotations.h"
#include "sql/vfs_wrapper.h"
#include "third_party/sqlite/sqlite3.h"
namespace sql {

@ -12,7 +12,7 @@
// other SQLite libraries loaded by the system libraries. This only matters when
// using the component build, where our SQLite's symbols are visible to the
// dynamic library loader.
#include "third_party/sqlite/src/amalgamation/rename_exports.h"
#include "third_party/sqlite/src/amalgamation/rename_exports.h" // IWYU pragma: export
#if defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)
// When SQLITE_OMIT_COMPILEOPTION_DIAGS is defined, sqlite3.h emits macros
@ -32,6 +32,6 @@
#endif // !defined(sqlite3_compileoption_used)
#endif // defined(SQLITE_OMIT_COMPILEOPTION_DIAGS)
#include "third_party/sqlite/src/amalgamation/sqlite3.h"
#include "third_party/sqlite/src/amalgamation/sqlite3.h" // IWYU pragma: export
#endif // THIRD_PARTY_SQLITE_SQLITE3_H_