From 38aeadc1c1db0e1b3a45df1d9784f57a6032fbbc Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Thu, 23 Oct 2014 18:47:27 -0400 Subject: [PATCH] minidump: Use forward declarations in more places. TEST=minidump_test R=rsesek@chromium.org Review URL: https://codereview.chromium.org/679443002 --- minidump/minidump_context_writer.cc | 1 + minidump/minidump_context_writer.h | 1 - minidump/minidump_crashpad_info_writer.cc | 1 + minidump/minidump_crashpad_info_writer.h | 1 - minidump/minidump_exception_writer.cc | 4 ++++ minidump/minidump_exception_writer.h | 5 ++--- minidump/minidump_exception_writer_test.cc | 1 + minidump/minidump_file_writer.cc | 1 + minidump/minidump_file_writer.h | 2 +- minidump/minidump_memory_writer.cc | 1 + minidump/minidump_memory_writer.h | 2 +- minidump/minidump_misc_info_writer.cc | 1 + minidump/minidump_misc_info_writer.h | 1 - minidump/minidump_module_writer.cc | 3 +++ minidump/minidump_module_writer.h | 2 -- minidump/minidump_module_writer_test.cc | 1 + minidump/minidump_simple_string_dictionary_writer.cc | 1 + minidump/minidump_simple_string_dictionary_writer.h | 1 - minidump/minidump_stream_writer.h | 1 - minidump/minidump_string_writer.cc | 3 +++ minidump/minidump_string_writer.h | 3 --- minidump/minidump_string_writer_test.cc | 1 + minidump/minidump_system_info_writer.cc | 2 ++ minidump/minidump_system_info_writer.h | 2 -- minidump/minidump_system_info_writer_test.cc | 1 + minidump/minidump_thread_writer.cc | 3 +++ minidump/minidump_thread_writer.h | 2 -- minidump/minidump_thread_writer_test.cc | 1 + minidump/minidump_writable.cc | 5 +++++ minidump/minidump_writable.h | 6 +++--- 30 files changed, 38 insertions(+), 22 deletions(-) diff --git a/minidump/minidump_context_writer.cc b/minidump/minidump_context_writer.cc index 3bbd4a4f..6b46eeb3 100644 --- a/minidump/minidump_context_writer.cc +++ b/minidump/minidump_context_writer.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_context_writer.h" #include "base/logging.h" +#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_context_writer.h b/minidump/minidump_context_writer.h index c31a1be4..c81a6e45 100644 --- a/minidump/minidump_context_writer.h +++ b/minidump/minidump_context_writer.h @@ -20,7 +20,6 @@ #include "base/basictypes.h" #include "minidump/minidump_context.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_crashpad_info_writer.cc b/minidump/minidump_crashpad_info_writer.cc index 2ad7291f..05dcafdc 100644 --- a/minidump/minidump_crashpad_info_writer.cc +++ b/minidump/minidump_crashpad_info_writer.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_crashpad_info_writer.h" #include "base/logging.h" +#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_crashpad_info_writer.h b/minidump/minidump_crashpad_info_writer.h index f36c91f5..96c49810 100644 --- a/minidump/minidump_crashpad_info_writer.h +++ b/minidump/minidump_crashpad_info_writer.h @@ -26,7 +26,6 @@ #include "minidump/minidump_simple_string_dictionary_writer.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_exception_writer.cc b/minidump/minidump_exception_writer.cc index 90f607ee..064c6014 100644 --- a/minidump/minidump_exception_writer.cc +++ b/minidump/minidump_exception_writer.cc @@ -14,7 +14,11 @@ #include "minidump/minidump_exception_writer.h" +#include + #include "base/logging.h" +#include "minidump/minidump_context_writer.h" +#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_exception_writer.h b/minidump/minidump_exception_writer.h index dc4ad6ce..b76b1ff1 100644 --- a/minidump/minidump_exception_writer.h +++ b/minidump/minidump_exception_writer.h @@ -17,17 +17,16 @@ #include #include -#include #include #include "base/basictypes.h" -#include "minidump/minidump_context_writer.h" #include "minidump/minidump_stream_writer.h" -#include "util/file/file_writer.h" namespace crashpad { +class MinidumpContextWriter; + //! \brief The writer for a MINIDUMP_EXCEPTION_STREAM stream in a minidump file. class MinidumpExceptionWriter final : public internal::MinidumpStreamWriter { public: diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc index 2b513274..899ba47d 100644 --- a/minidump/minidump_exception_writer_test.cc +++ b/minidump/minidump_exception_writer_test.cc @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/minidump/minidump_file_writer.cc b/minidump/minidump_file_writer.cc index 8e67db06..fb3b4765 100644 --- a/minidump/minidump_file_writer.cc +++ b/minidump/minidump_file_writer.cc @@ -16,6 +16,7 @@ #include "base/logging.h" #include "minidump/minidump_writer_util.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_file_writer.h b/minidump/minidump_file_writer.h index 2faa35b0..4d4653fb 100644 --- a/minidump/minidump_file_writer.h +++ b/minidump/minidump_file_writer.h @@ -22,9 +22,9 @@ #include #include "base/basictypes.h" +#include "minidump/minidump_extensions.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_memory_writer.cc b/minidump/minidump_memory_writer.cc index 5857dbcf..536cd148 100644 --- a/minidump/minidump_memory_writer.cc +++ b/minidump/minidump_memory_writer.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_memory_writer.h" #include "base/logging.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_memory_writer.h b/minidump/minidump_memory_writer.h index 0f3c509c..24625e21 100644 --- a/minidump/minidump_memory_writer.h +++ b/minidump/minidump_memory_writer.h @@ -16,6 +16,7 @@ #define CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_WRITER_H_ #include +#include #include #include @@ -23,7 +24,6 @@ #include "base/basictypes.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_misc_info_writer.cc b/minidump/minidump_misc_info_writer.cc index 0742ee5f..5226c325 100644 --- a/minidump/minidump_misc_info_writer.cc +++ b/minidump/minidump_misc_info_writer.cc @@ -18,6 +18,7 @@ #include "base/numerics/safe_conversions.h" #include "base/strings/utf_string_conversions.h" #include "minidump/minidump_writer_util.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_misc_info_writer.h b/minidump/minidump_misc_info_writer.h index f68d1be6..8a741746 100644 --- a/minidump/minidump_misc_info_writer.h +++ b/minidump/minidump_misc_info_writer.h @@ -25,7 +25,6 @@ #include "base/basictypes.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_module_writer.cc b/minidump/minidump_module_writer.cc index 76521554..8aa96808 100644 --- a/minidump/minidump_module_writer.cc +++ b/minidump/minidump_module_writer.cc @@ -14,9 +14,12 @@ #include "minidump/minidump_module_writer.h" +#include + #include "base/logging.h" #include "minidump/minidump_string_writer.h" #include "minidump/minidump_writer_util.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_module_writer.h b/minidump/minidump_module_writer.h index f464e488..6cef8ad9 100644 --- a/minidump/minidump_module_writer.h +++ b/minidump/minidump_module_writer.h @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -29,7 +28,6 @@ #include "minidump/minidump_extensions.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_module_writer_test.cc b/minidump/minidump_module_writer_test.cc index 1aef0f16..3a00def3 100644 --- a/minidump/minidump_module_writer_test.cc +++ b/minidump/minidump_module_writer_test.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include "base/strings/utf_string_conversions.h" #include "gtest/gtest.h" diff --git a/minidump/minidump_simple_string_dictionary_writer.cc b/minidump/minidump_simple_string_dictionary_writer.cc index 0b47cf8b..ef3a1eca 100644 --- a/minidump/minidump_simple_string_dictionary_writer.cc +++ b/minidump/minidump_simple_string_dictionary_writer.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_simple_string_dictionary_writer.h" #include "base/logging.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_simple_string_dictionary_writer.h b/minidump/minidump_simple_string_dictionary_writer.h index 620444a1..8a6c31db 100644 --- a/minidump/minidump_simple_string_dictionary_writer.h +++ b/minidump/minidump_simple_string_dictionary_writer.h @@ -25,7 +25,6 @@ #include "minidump/minidump_extensions.h" #include "minidump/minidump_string_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_stream_writer.h b/minidump/minidump_stream_writer.h index 6eddbab7..4fb5b89c 100644 --- a/minidump/minidump_stream_writer.h +++ b/minidump/minidump_stream_writer.h @@ -16,7 +16,6 @@ #define CRASHPAD_MINIDUMP_MINIDUMP_STREAM_WRITER_H_ #include -#include #include "base/basictypes.h" #include "minidump/minidump_extensions.h" diff --git a/minidump/minidump_string_writer.cc b/minidump/minidump_string_writer.cc index 4c57a43a..f3623d8a 100644 --- a/minidump/minidump_string_writer.cc +++ b/minidump/minidump_string_writer.cc @@ -14,8 +14,11 @@ #include "minidump/minidump_string_writer.h" +#include + #include "base/logging.h" #include "minidump/minidump_writer_util.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_string_writer.h b/minidump/minidump_string_writer.h index f6c76961..9c0e6097 100644 --- a/minidump/minidump_string_writer.h +++ b/minidump/minidump_string_writer.h @@ -16,8 +16,6 @@ #define CRASHPAD_MINIDUMP_MINIDUMP_STRING_WRITER_H_ #include -#include -#include #include @@ -25,7 +23,6 @@ #include "base/strings/string16.h" #include "minidump/minidump_extensions.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { namespace internal { diff --git a/minidump/minidump_string_writer_test.cc b/minidump/minidump_string_writer_test.cc index 82219940..3501a07b 100644 --- a/minidump/minidump_string_writer_test.cc +++ b/minidump/minidump_string_writer_test.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_string_writer.h" #include +#include #include diff --git a/minidump/minidump_system_info_writer.cc b/minidump/minidump_system_info_writer.cc index a8cabb7b..05e0bacb 100644 --- a/minidump/minidump_system_info_writer.cc +++ b/minidump/minidump_system_info_writer.cc @@ -15,9 +15,11 @@ #include "minidump/minidump_system_info_writer.h" #include +#include #include "base/logging.h" #include "minidump/minidump_string_writer.h" +#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_system_info_writer.h b/minidump/minidump_system_info_writer.h index 3d219590..1bc0392d 100644 --- a/minidump/minidump_system_info_writer.h +++ b/minidump/minidump_system_info_writer.h @@ -17,7 +17,6 @@ #include #include -#include #include #include @@ -27,7 +26,6 @@ #include "minidump/minidump_extensions.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc index da7895bd..3ea0f636 100644 --- a/minidump/minidump_system_info_writer_test.cc +++ b/minidump/minidump_system_info_writer_test.cc @@ -16,6 +16,7 @@ #include #include +#include #include diff --git a/minidump/minidump_thread_writer.cc b/minidump/minidump_thread_writer.cc index e2392322..1dc3bc28 100644 --- a/minidump/minidump_thread_writer.cc +++ b/minidump/minidump_thread_writer.cc @@ -14,9 +14,12 @@ #include "minidump/minidump_thread_writer.h" +#include + #include "base/logging.h" #include "minidump/minidump_context_writer.h" #include "minidump/minidump_memory_writer.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace crashpad { diff --git a/minidump/minidump_thread_writer.h b/minidump/minidump_thread_writer.h index 92f22152..8fce7cbe 100644 --- a/minidump/minidump_thread_writer.h +++ b/minidump/minidump_thread_writer.h @@ -17,14 +17,12 @@ #include #include -#include #include #include "base/basictypes.h" #include "minidump/minidump_stream_writer.h" #include "minidump/minidump_writable.h" -#include "util/file/file_writer.h" namespace crashpad { diff --git a/minidump/minidump_thread_writer_test.cc b/minidump/minidump_thread_writer_test.cc index 74fc7fe8..db9d9c51 100644 --- a/minidump/minidump_thread_writer_test.cc +++ b/minidump/minidump_thread_writer_test.cc @@ -15,6 +15,7 @@ #include "minidump/minidump_thread_writer.h" #include +#include #include "gtest/gtest.h" #include "minidump/minidump_context_writer.h" diff --git a/minidump/minidump_writable.cc b/minidump/minidump_writable.cc index f1113a43..3bb4bffa 100644 --- a/minidump/minidump_writable.cc +++ b/minidump/minidump_writable.cc @@ -14,7 +14,12 @@ #include "minidump/minidump_writable.h" +#include + +#include + #include "base/logging.h" +#include "util/file/file_writer.h" #include "util/numeric/safe_assignment.h" namespace { diff --git a/minidump/minidump_writable.h b/minidump/minidump_writable.h index 15876d48..ccace8c8 100644 --- a/minidump/minidump_writable.h +++ b/minidump/minidump_writable.h @@ -16,16 +16,16 @@ #define CRASHPAD_MINIDUMP_MINIDUMP_WRITABLE_H_ #include -#include #include -#include #include #include "base/basictypes.h" -#include "util/file/file_writer.h" namespace crashpad { + +class FileWriterInterface; + namespace internal { //! \brief The base class for all content that might be written to a minidump