diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 15:01:29 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 15:01:29 +0000 |
commit | f539333976d799cf69562263b7a5b52d6cb0fc36 (patch) | |
tree | c96e836d839a4db08c5ad46b4f4f89b9e7850c87 /base | |
parent | 7152c349d7b4704d951e97af42d33cab1753ea7e (diff) | |
download | chromium_src-f539333976d799cf69562263b7a5b52d6cb0fc36.zip chromium_src-f539333976d799cf69562263b7a5b52d6cb0fc36.tar.gz chromium_src-f539333976d799cf69562263b7a5b52d6cb0fc36.tar.bz2 |
Reduce header dependencies in base/
Also adds more explicit #includes for needed things.
Review URL: http://codereview.chromium.org/118162
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/clipboard.cc | 1 | ||||
-rw-r--r-- | base/clipboard.h | 8 | ||||
-rw-r--r-- | base/clipboard_linux.cc | 2 | ||||
-rw-r--r-- | base/clipboard_mac.mm | 1 | ||||
-rw-r--r-- | base/clipboard_unittest.cc | 1 | ||||
-rw-r--r-- | base/clipboard_win.cc | 2 | ||||
-rw-r--r-- | base/condition_variable.h | 9 | ||||
-rw-r--r-- | base/condition_variable_unittest.cc | 1 | ||||
-rw-r--r-- | base/debug_util.h | 2 | ||||
-rw-r--r-- | base/debug_util_win.cc | 6 | ||||
-rw-r--r-- | base/field_trial.h | 1 | ||||
-rw-r--r-- | base/file_version_info.cc | 5 | ||||
-rw-r--r-- | base/file_version_info.h | 3 | ||||
-rw-r--r-- | base/file_version_info_mac.mm | 1 | ||||
-rw-r--r-- | base/idle_timer.h | 1 | ||||
-rw-r--r-- | base/message_loop.h | 3 | ||||
-rw-r--r-- | base/perftimer.h | 4 | ||||
-rw-r--r-- | base/scoped_clipboard_writer.cc | 1 | ||||
-rw-r--r-- | base/system_monitor.h | 9 | ||||
-rw-r--r-- | base/tracked_objects.cc | 1 | ||||
-rw-r--r-- | base/tracked_objects.h | 4 | ||||
-rw-r--r-- | base/tracked_objects_unittest.cc | 2 | ||||
-rw-r--r-- | base/waitable_event.h | 3 |
23 files changed, 50 insertions, 21 deletions
diff --git a/base/clipboard.cc b/base/clipboard.cc index e41fd93..57697c5 100644 --- a/base/clipboard.cc +++ b/base/clipboard.cc @@ -4,6 +4,7 @@ #include "base/clipboard.h" +#include "base/gfx/size.h" #include "base/logging.h" namespace { diff --git a/base/clipboard.h b/base/clipboard.h index 98f3b31..a404418 100644 --- a/base/clipboard.h +++ b/base/clipboard.h @@ -9,10 +9,14 @@ #include <string> #include <vector> -#include "base/file_path.h" #include "base/process.h" #include "base/string16.h" -#include "base/gfx/size.h" + +namespace gfx { +class Size; +} + +class FilePath; class Clipboard { public: diff --git a/base/clipboard_linux.cc b/base/clipboard_linux.cc index d5195b4..10c0deb 100644 --- a/base/clipboard_linux.cc +++ b/base/clipboard_linux.cc @@ -10,6 +10,8 @@ #include <string> #include <utility> +#include "base/file_path.h" +#include "base/gfx/size.h" #include "base/scoped_ptr.h" #include "base/linux_util.h" #include "base/string_util.h" diff --git a/base/clipboard_mac.mm b/base/clipboard_mac.mm index 8363ffb..889655f 100644 --- a/base/clipboard_mac.mm +++ b/base/clipboard_mac.mm @@ -6,6 +6,7 @@ #import <Cocoa/Cocoa.h> +#include "base/file_path.h" #include "base/logging.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" diff --git a/base/clipboard_unittest.cc b/base/clipboard_unittest.cc index 4880042..808c5e6 100644 --- a/base/clipboard_unittest.cc +++ b/base/clipboard_unittest.cc @@ -6,6 +6,7 @@ #include "base/basictypes.h" #include "base/clipboard.h" +#include "base/gfx/size.h" #include "base/message_loop.h" #include "base/scoped_clipboard_writer.h" #include "base/string_util.h" diff --git a/base/clipboard_win.cc b/base/clipboard_win.cc index 5ce479f..684bec6 100644 --- a/base/clipboard_win.cc +++ b/base/clipboard_win.cc @@ -11,6 +11,8 @@ #include <shellapi.h> #include "base/clipboard_util.h" +#include "base/file_path.h" +#include "base/gfx/size.h" #include "base/lock.h" #include "base/logging.h" #include "base/message_loop.h" diff --git a/base/condition_variable.h b/base/condition_variable.h index 28f9352..430f57c 100644 --- a/base/condition_variable.h +++ b/base/condition_variable.h @@ -65,6 +65,15 @@ #ifndef BASE_CONDITION_VARIABLE_H_ #define BASE_CONDITION_VARIABLE_H_ +#include "build/build_config.h" + +#if defined(OS_WIN) +#include <windows.h> +#elif defined(OS_POSIX) +#include <pthread.h> +#endif + +#include "base/basictypes.h" #include "base/lock.h" namespace base { diff --git a/base/condition_variable_unittest.cc b/base/condition_variable_unittest.cc index 8e00394..c49a8cb 100644 --- a/base/condition_variable_unittest.cc +++ b/base/condition_variable_unittest.cc @@ -9,6 +9,7 @@ #include <vector> #include "base/condition_variable.h" +#include "base/lock.h" #include "base/logging.h" #include "base/platform_thread.h" #include "base/scoped_ptr.h" diff --git a/base/debug_util.h b/base/debug_util.h index 3ca199c..de4a208 100644 --- a/base/debug_util.h +++ b/base/debug_util.h @@ -9,7 +9,7 @@ #ifndef BASE_DEBUG_UTIL_H_ #define BASE_DEBUG_UTIL_H_ -#include <iostream> +#include <iosfwd> #include <vector> #include "base/basictypes.h" diff --git a/base/debug_util_win.cc b/base/debug_util_win.cc index 5201283..dd67c17 100644 --- a/base/debug_util_win.cc +++ b/base/debug_util_win.cc @@ -7,6 +7,8 @@ #include <windows.h> #include <dbghelp.h> +#include <iostream> + #include "base/basictypes.h" #include "base/lock.h" #include "base/logging.h" @@ -130,7 +132,7 @@ class SymbolContext { // Returns the process this was initialized for. This should only be // called if Init() has been called. We LOG(ERROR) in this situation. - // LOG(FATAL) is not used because this code is might be triggered + // LOG(FATAL) is not used because this code is might be triggered // by a LOG(FATAL) itself. HANDLE process() { if (!initialized_) { @@ -146,7 +148,7 @@ class SymbolContext { // to the ostream os. The format for each line of the backtrace is: // // <tab>SymbolName[0xAddress+Offset] (FileName:LineNo) - // + // // This function should only be called if Init() has been called. We do not // LOG(FATAL) here because this code is called might be triggered by a // LOG(FATAL) itself. diff --git a/base/field_trial.h b/base/field_trial.h index 83cbcf6..39a5bc7 100644 --- a/base/field_trial.h +++ b/base/field_trial.h @@ -66,7 +66,6 @@ #include <string> #include "base/lock.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" #include "base/time.h" diff --git a/base/file_version_info.cc b/base/file_version_info.cc index 95fa7c6..4f7f23d 100644 --- a/base/file_version_info.cc +++ b/base/file_version_info.cc @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <windows.h> - #include "base/file_version_info.h" +#include <windows.h> + +#include "base/file_path.h" #include "base/logging.h" #include "base/path_service.h" diff --git a/base/file_version_info.h b/base/file_version_info.h index f38d23f..7e86639 100644 --- a/base/file_version_info.h +++ b/base/file_version_info.h @@ -8,7 +8,6 @@ #include <string> #include "base/basictypes.h" -#include "base/file_path.h" #include "base/scoped_ptr.h" #if defined(OS_WIN) @@ -22,6 +21,8 @@ class NSBundle; #endif #endif +class FilePath; + // Provides a way to access the version information for a file. // This is the information you access when you select a file in the Windows // explorer, right-click select Properties, then click the Version tab. diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm index 7090003..ae6603f 100644 --- a/base/file_version_info_mac.mm +++ b/base/file_version_info_mac.mm @@ -6,6 +6,7 @@ #import <Cocoa/Cocoa.h> +#include "base/file_path.h" #include "base/logging.h" #include "base/string_util.h" diff --git a/base/idle_timer.h b/base/idle_timer.h index 355c217..1f6c08c 100644 --- a/base/idle_timer.h +++ b/base/idle_timer.h @@ -33,7 +33,6 @@ #endif #include "base/basictypes.h" -#include "base/task.h" #include "base/timer.h" namespace base { diff --git a/base/message_loop.h b/base/message_loop.h index 0b89e28..01f8c92 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -5,10 +5,8 @@ #ifndef BASE_MESSAGE_LOOP_H_ #define BASE_MESSAGE_LOOP_H_ -#include <deque> #include <queue> #include <string> -#include <vector> #include "base/histogram.h" #include "base/message_pump.h" @@ -16,7 +14,6 @@ #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/task.h" -#include "base/timer.h" #if defined(OS_WIN) // We need this to declare base::MessagePumpWin::Dispatcher, which we should diff --git a/base/perftimer.h b/base/perftimer.h index 6274fee..1ac1a7d 100644 --- a/base/perftimer.h +++ b/base/perftimer.h @@ -6,10 +6,12 @@ #define BASE_PERFTIMER_H_ #include <string> + #include "base/basictypes.h" -#include "base/file_path.h" #include "base/time.h" +class FilePath; + // ---------------------------------------------------------------------- // Initializes and finalizes the perf log. These functions should be // called at the beginning and end (respectively) of running all the diff --git a/base/scoped_clipboard_writer.cc b/base/scoped_clipboard_writer.cc index 9c74e6b..f413061 100644 --- a/base/scoped_clipboard_writer.cc +++ b/base/scoped_clipboard_writer.cc @@ -8,6 +8,7 @@ // base/clipboard.h. #include "base/scoped_clipboard_writer.h" +#include "base/gfx/size.h" #include "base/string_util.h" ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard) diff --git a/base/system_monitor.h b/base/system_monitor.h index 9fcac9c..7eee09d 100644 --- a/base/system_monitor.h +++ b/base/system_monitor.h @@ -5,8 +5,7 @@ #ifndef BASE_SYSTEM_MONITOR_H_ #define BASE_SYSTEM_MONITOR_H_ -#include "base/observer_list_threadsafe.h" -#include "base/singleton.h" +#include "build/build_config.h" // Windows HiRes timers drain the battery faster so we need to know the battery // status. This isn't true for other platforms. @@ -16,6 +15,12 @@ #undef ENABLE_BATTERY_MONITORING #endif // !OS_WIN +#include "base/observer_list_threadsafe.h" +#include "base/singleton.h" +#if defined(ENABLE_BATTERY_MONITORING) +#include "base/timer.h" +#endif // defined(ENABLE_BATTERY_MONITORING) + namespace base { // Class for monitoring various system-related subsystems diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index f95f9b8..a97f014 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -6,6 +6,7 @@ #include <math.h> +#include "base/message_loop.h" #include "base/string_util.h" using base::TimeDelta; diff --git a/base/tracked_objects.h b/base/tracked_objects.h index 064de3c..f355b8d 100644 --- a/base/tracked_objects.h +++ b/base/tracked_objects.h @@ -5,16 +5,16 @@ #ifndef BASE_TRACKED_OBJECTS_H_ #define BASE_TRACKED_OBJECTS_H_ -//------------------------------------------------------------------------------ #include <map> #include <string> #include <vector> #include "base/lock.h" -#include "base/message_loop.h" +#include "base/task.h" #include "base/thread_local_storage.h" #include "base/tracked.h" +class MessageLoop; namespace tracked_objects { diff --git a/base/tracked_objects_unittest.cc b/base/tracked_objects_unittest.cc index c9674f5..ab615da 100644 --- a/base/tracked_objects_unittest.cc +++ b/base/tracked_objects_unittest.cc @@ -5,6 +5,8 @@ // Test of classes in the tracked_objects.h classes. #include "base/tracked_objects.h" + +#include "base/message_loop.h" #include "testing/gtest/include/gtest/gtest.h" namespace tracked_objects { diff --git a/base/waitable_event.h b/base/waitable_event.h index d3b4952..31aa085 100644 --- a/base/waitable_event.h +++ b/base/waitable_event.h @@ -14,13 +14,10 @@ #if defined(OS_POSIX) #include <list> #include <utility> -#include "base/condition_variable.h" #include "base/lock.h" #include "base/ref_counted.h" #endif -#include "base/message_loop.h" - namespace base { // This replaces INFINITE from Win32 |