Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit dd5b313bfc80fa54c2b72679c5a78863cfc78d1d 1 parent 1022b05
phajdan.jr@chromium.org authored
Showing with 64 additions and 22 deletions.
  1. +1 −0  base/clipboard.cc
  2. +6 −2 base/clipboard.h
  3. +2 −0  base/clipboard_linux.cc
  4. +1 −0  base/clipboard_mac.mm
  5. +1 −0  base/clipboard_unittest.cc
  6. +2 −0  base/clipboard_win.cc
  7. +9 −0 base/condition_variable.h
  8. +1 −0  base/condition_variable_unittest.cc
  9. +1 −1  base/debug_util.h
  10. +4 −2 base/debug_util_win.cc
  11. +0 −1  base/field_trial.h
  12. +3 −2 base/file_version_info.cc
  13. +2 −1  base/file_version_info.h
  14. +1 −0  base/file_version_info_mac.mm
  15. +0 −1  base/idle_timer.h
  16. +0 −3  base/message_loop.h
  17. +3 −1 base/perftimer.h
  18. +1 −0  base/scoped_clipboard_writer.cc
  19. +7 −2 base/system_monitor.h
  20. +1 −0  base/tracked_objects.cc
  21. +2 −2 base/tracked_objects.h
  22. +2 −0  base/tracked_objects_unittest.cc
  23. +0 −3  base/waitable_event.h
  24. +1 −0  chrome/browser/download/download_manager.h
  25. +1 −0  chrome/browser/net/url_fetcher_unittest.cc
  26. +1 −0  chrome/browser/printing/print_job.cc
  27. +1 −1  chrome/browser/renderer_host/audio_renderer_host.h
  28. +2 −0  chrome/browser/renderer_host/render_widget_helper.h
  29. +1 −0  chrome/browser/safe_browsing/protocol_manager.h
  30. +1 −0  chrome/renderer/media/audio_renderer_impl.h
  31. +1 −0  media/base/mock_media_filters.h
  32. +1 −0  media/filters/video_thread.h
  33. +1 −0  net/disk_cache/disk_cache_test_util.h
  34. +1 −0  net/url_request/url_request_new_ftp_job.cc
  35. +1 −0  views/controls/menu/chrome_menu.h
  36. +1 −0  webkit/tools/test_shell/simple_resource_loader_bridge.cc
View
1  base/clipboard.cc
@@ -4,6 +4,7 @@
#include "base/clipboard.h"
+#include "base/gfx/size.h"
#include "base/logging.h"
namespace {
View
8 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:
View
2  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"
View
1  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"
View
1  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"
View
2  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"
View
9 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 {
View
1  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"
View
2  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"
View
6 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.
View
1  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"
View
5 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"
View
3  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.
View
1  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"
View
1  base/idle_timer.h
@@ -33,7 +33,6 @@
#endif
#include "base/basictypes.h"
-#include "base/task.h"
#include "base/timer.h"
namespace base {
View
3  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
View
4 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
View
1  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)
View
9 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
View
1  base/tracked_objects.cc
@@ -6,6 +6,7 @@
#include <math.h>
+#include "base/message_loop.h"
#include "base/string_util.h"
using base::TimeDelta;
View
4 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 {
View
2  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 {
View
3  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
View
1  chrome/browser/download/download_manager.h
@@ -48,6 +48,7 @@
#include "base/observer_list.h"
#include "base/ref_counted.h"
#include "base/time.h"
+#include "base/timer.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/download_types.h"
#include "chrome/browser/history/history.h"
View
1  chrome/browser/net/url_fetcher_unittest.cc
@@ -4,6 +4,7 @@
#include "base/thread.h"
#include "base/time.h"
+#include "base/timer.h"
#include "chrome/browser/net/url_fetcher.h"
#include "chrome/browser/net/url_fetcher_protect.h"
#include "chrome/common/chrome_plugin_lib.h"
View
1  chrome/browser/printing/print_job.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/printing/print_job.h"
#include "base/message_loop.h"
+#include "base/timer.h"
#include "chrome/browser/printing/print_job_worker.h"
#include "chrome/browser/printing/printed_document.h"
#include "chrome/browser/printing/printed_page.h"
View
2  chrome/browser/renderer_host/audio_renderer_host.h
@@ -36,6 +36,7 @@
#include <map>
#include <deque>
+#include "base/lock.h"
#include "base/process.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
@@ -44,7 +45,6 @@
#include "media/audio/audio_output.h"
class AudioManager;
-class Lock;
class MessageLoop;
struct ViewHostMsg_Audio_CreateStream;
View
2  chrome/browser/renderer_host/render_widget_helper.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_
#define CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_
+#include <map>
+
#include "base/atomic_sequence_num.h"
#include "base/hash_tables.h"
#include "base/process.h"
View
1  chrome/browser/safe_browsing/protocol_manager.h
@@ -16,6 +16,7 @@
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
+#include "base/timer.h"
#include "chrome/browser/net/url_fetcher.h"
#include "chrome/browser/safe_browsing/chunk_range.h"
#include "chrome/browser/safe_browsing/protocol_parser.h"
View
1  chrome/renderer/media/audio_renderer_impl.h
@@ -91,6 +91,7 @@
#ifndef CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_
#define CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_
+#include "base/scoped_ptr.h"
#include "base/lock.h"
#include "base/shared_memory.h"
#include "base/waitable_event.h"
View
1  media/base/mock_media_filters.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/scoped_ptr.h"
#include "base/waitable_event.h"
#include "media/base/buffers.h"
#include "media/base/factory.h"
View
1  media/filters/video_thread.h
@@ -18,6 +18,7 @@
#include <deque>
#include "base/condition_variable.h"
+#include "base/lock.h"
#include "media/base/filters.h"
namespace media {
View
1  net/disk_cache/disk_cache_test_util.h
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/task.h"
+#include "base/timer.h"
// Re-creates a given test file inside the cache test folder.
bool CreateCacheTestFile(const wchar_t* name);
View
1  net/url_request/url_request_new_ftp_job.cc
@@ -4,6 +4,7 @@
#include "net/url_request/url_request_new_ftp_job.h"
+#include "base/compiler_specific.h"
#include "base/file_version_info.h"
#include "base/message_loop.h"
#include "net/base/escape.h"
View
1  views/controls/menu/chrome_menu.h
@@ -15,6 +15,7 @@
#include "base/gfx/rect.h"
#include "base/message_loop.h"
#include "base/task.h"
+#include "base/timer.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/menu/controller.h"
#include "views/event.h"
View
1  webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -35,6 +35,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/time.h"
+#include "base/timer.h"
#include "base/thread.h"
#include "base/waitable_event.h"
#include "net/base/cookie_monster.h"
Please sign in to comment.
Something went wrong with that request. Please try again.