summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 18:15:28 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 18:15:28 +0000
commita91e1409a1b702892be19b058ad418b92ab4dd28 (patch)
treef65055a03ec7147674e921e80664be5bef9acef0
parent1ebe3cefbab03f450586895feea998f994ff13f8 (diff)
downloadchromium_src-a91e1409a1b702892be19b058ad418b92ab4dd28.zip
chromium_src-a91e1409a1b702892be19b058ad418b92ab4dd28.tar.gz
chromium_src-a91e1409a1b702892be19b058ad418b92ab4dd28.tar.bz2
Reland r52336.
(I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/animation_container_unittest.cc1
-rw-r--r--app/slide_animation_unittest.cc1
-rw-r--r--base/message_loop.cc79
-rw-r--r--base/message_loop.h8
-rw-r--r--base/message_loop_proxy_impl_unittest.cc1
-rw-r--r--base/observer_list_threadsafe.h3
-rw-r--r--base/weak_ptr_unittest.cc1
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc1
-rw-r--r--chrome/browser/autocomplete/autocomplete_unittest.cc1
-rw-r--r--chrome/browser/autocomplete/search_provider.h1
-rw-r--r--chrome/browser/browser_init.cc1
-rw-r--r--chrome/browser/cancelable_request.h1
-rw-r--r--chrome/browser/chrome_thread_unittest.cc1
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc1
-rw-r--r--chrome/browser/cocoa/download_item_controller.mm1
-rw-r--r--chrome/browser/cocoa/external_protocol_dialog.mm1
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket_unittest.h1
-rw-r--r--chrome/browser/download/download_util.h18
-rw-r--r--chrome/browser/extensions/crx_installer.h1
-rw-r--r--chrome/browser/extensions/extension_prefs.h1
-rw-r--r--chrome/browser/extensions/extension_updater.cc1
-rw-r--r--chrome/browser/gears_integration.cc1
-rw-r--r--chrome/browser/geolocation/access_token_store.h1
-rw-r--r--chrome/browser/google_url_tracker.h1
-rw-r--r--chrome/browser/gtk/download_item_gtk.cc1
-rw-r--r--chrome/browser/idle.h2
-rw-r--r--chrome/browser/io_thread.h1
-rw-r--r--chrome/browser/memory_details.cc1
-rw-r--r--chrome/browser/net/chrome_net_log.h1
-rw-r--r--chrome/browser/omnibox_search_hint.cc1
-rw-r--r--chrome/browser/plugin_process_host.h1
-rw-r--r--chrome/browser/printing/print_job.h1
-rw-r--r--chrome/browser/profile_import_process_host.h1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.cc1
-rw-r--r--chrome/browser/sessions/session_service.cc1
-rw-r--r--chrome/browser/spellcheck_host.h1
-rw-r--r--chrome/browser/sync/util/extensions_activity_monitor.h2
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc1
-rw-r--r--chrome/browser/views/download_item_view.cc1
-rw-r--r--chrome/common/desktop_notifications/active_notification_tracker.cc1
-rw-r--r--chrome/common/net/gaia/gaia_authenticator2.h1
-rw-r--r--chrome/renderer/gpu_channel_host.h1
-rw-r--r--chrome/service/cloud_print/job_status_updater.h1
-rw-r--r--chrome/service/service_process.h1
-rw-r--r--ipc/ipc_channel_win.h1
-rw-r--r--ipc/ipc_sync_channel_unittest.cc1
-rw-r--r--media/base/filters.h1
-rw-r--r--media/base/pipeline_impl.h1
-rw-r--r--media/base/video_frame_unittest.cc1
-rw-r--r--media/filters/ffmpeg_glue_unittest.cc1
-rw-r--r--media/filters/video_renderer_base.h1
-rw-r--r--net/base/capturing_net_log.h1
-rw-r--r--net/base/file_stream_posix.cc1
-rw-r--r--net/base/file_stream_win.cc1
-rw-r--r--net/base/host_resolver_impl.cc1
-rw-r--r--net/base/listen_socket_unittest.h1
-rw-r--r--net/base/net_log.cc1
-rw-r--r--net/base/net_log.h6
-rw-r--r--net/base/net_util.cc1
-rw-r--r--net/http/http_auth_handler.h1
-rw-r--r--net/proxy/proxy_service.cc1
-rw-r--r--net/server/http_listen_socket.cc2
-rw-r--r--net/server/http_server_request_info.h1
-rw-r--r--net/tools/fetch/http_listen_socket.cc5
-rw-r--r--net/tools/fetch/http_server_request_info.h1
-rw-r--r--net/url_request/url_request.h2
-rw-r--r--net/url_request/url_request_job.cc1
-rw-r--r--webkit/glue/webmediaplayer_impl.h1
-rw-r--r--webkit/glue/weburlloader_impl.cc1
69 files changed, 110 insertions, 76 deletions
diff --git a/app/animation_container_unittest.cc b/app/animation_container_unittest.cc
index e4253c6..153462b 100644
--- a/app/animation_container_unittest.cc
+++ b/app/animation_container_unittest.cc
@@ -5,6 +5,7 @@
#include "app/animation_container.h"
#include "app/linear_animation.h"
#include "app/test_animation_delegate.h"
+#include "base/scoped_ptr.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/app/slide_animation_unittest.cc b/app/slide_animation_unittest.cc
index 8bc947f..d34b975 100644
--- a/app/slide_animation_unittest.cc
+++ b/app/slide_animation_unittest.cc
@@ -4,6 +4,7 @@
#include "app/slide_animation.h"
#include "app/test_animation_delegate.h"
+#include "base/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
class SlideAnimationTest: public testing::Test {
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 1668fd7..218ff26 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/compiler_specific.h"
+#include "base/histogram.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/message_pump_default.h"
@@ -27,22 +28,53 @@
using base::Time;
using base::TimeDelta;
+namespace {
+
// A lazily created thread local storage for quick access to a thread's message
// loop, if one exists. This should be safe and free of static constructors.
-static base::LazyInstance<base::ThreadLocalPointer<MessageLoop> > lazy_tls_ptr(
+base::LazyInstance<base::ThreadLocalPointer<MessageLoop> > lazy_tls_ptr(
base::LINKER_INITIALIZED);
-//------------------------------------------------------------------------------
-
// Logical events for Histogram profiling. Run with -message-loop-histogrammer
// to get an accounting of messages and actions taken on each thread.
-static const int kTaskRunEvent = 0x1;
-static const int kTimerEvent = 0x2;
+const int kTaskRunEvent = 0x1;
+const int kTimerEvent = 0x2;
// Provide range of message IDs for use in histogramming and debug display.
-static const int kLeastNonZeroMessageId = 1;
-static const int kMaxMessageId = 1099;
-static const int kNumberOfDistinctMessagesDisplayed = 1100;
+const int kLeastNonZeroMessageId = 1;
+const int kMaxMessageId = 1099;
+const int kNumberOfDistinctMessagesDisplayed = 1100;
+
+// Provide a macro that takes an expression (such as a constant, or macro
+// constant) and creates a pair to initalize an array of pairs. In this case,
+// our pair consists of the expressions value, and the "stringized" version
+// of the expression (i.e., the exrpression put in quotes). For example, if
+// we have:
+// #define FOO 2
+// #define BAR 5
+// then the following:
+// VALUE_TO_NUMBER_AND_NAME(FOO + BAR)
+// will expand to:
+// {7, "FOO + BAR"}
+// We use the resulting array as an argument to our histogram, which reads the
+// number as a bucket identifier, and proceeds to use the corresponding name
+// in the pair (i.e., the quoted string) when printing out a histogram.
+#define VALUE_TO_NUMBER_AND_NAME(name) {name, #name},
+
+const LinearHistogram::DescriptionPair event_descriptions_[] = {
+ // Provide some pretty print capability in our histogram for our internal
+ // messages.
+
+ // A few events we handle (kindred to messages), and used to profile actions.
+ VALUE_TO_NUMBER_AND_NAME(kTaskRunEvent)
+ VALUE_TO_NUMBER_AND_NAME(kTimerEvent)
+
+ {-1, NULL} // The list must be null terminated, per API to histogram.
+};
+
+bool enable_histogrammer_ = false;
+
+} // namespace
//------------------------------------------------------------------------------
@@ -567,9 +599,6 @@ bool MessageLoop::PendingTask::operator<(const PendingTask& other) const {
// on each thread.
// static
-bool MessageLoop::enable_histogrammer_ = false;
-
-// static
void MessageLoop::EnableHistogrammer(bool enable) {
enable_histogrammer_ = enable;
}
@@ -591,34 +620,6 @@ void MessageLoop::HistogramEvent(int event) {
message_histogram_->Add(event);
}
-// Provide a macro that takes an expression (such as a constant, or macro
-// constant) and creates a pair to initalize an array of pairs. In this case,
-// our pair consists of the expressions value, and the "stringized" version
-// of the expression (i.e., the exrpression put in quotes). For example, if
-// we have:
-// #define FOO 2
-// #define BAR 5
-// then the following:
-// VALUE_TO_NUMBER_AND_NAME(FOO + BAR)
-// will expand to:
-// {7, "FOO + BAR"}
-// We use the resulting array as an argument to our histogram, which reads the
-// number as a bucket identifier, and proceeds to use the corresponding name
-// in the pair (i.e., the quoted string) when printing out a histogram.
-#define VALUE_TO_NUMBER_AND_NAME(name) {name, #name},
-
-// static
-const LinearHistogram::DescriptionPair MessageLoop::event_descriptions_[] = {
- // Provide some pretty print capability in our histogram for our internal
- // messages.
-
- // A few events we handle (kindred to messages), and used to profile actions.
- VALUE_TO_NUMBER_AND_NAME(kTaskRunEvent)
- VALUE_TO_NUMBER_AND_NAME(kTimerEvent)
-
- {-1, NULL} // The list must be null terminated, per API to histogram.
-};
-
//------------------------------------------------------------------------------
// MessageLoopForUI
diff --git a/base/message_loop.h b/base/message_loop.h
index 8deacec..35b2651 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -9,11 +9,10 @@
#include <string>
#include "base/basictypes.h"
-#include "base/histogram.h"
+#include "base/lock.h"
#include "base/message_pump.h"
#include "base/observer_list.h"
#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
#include "base/task.h"
#if defined(OS_WIN)
@@ -27,6 +26,8 @@
#endif
#endif
+class Histogram;
+
// A MessageLoop is used to process events for a particular thread. There is
// at most one MessageLoop instance per thread.
//
@@ -427,9 +428,6 @@ class MessageLoop : public base::MessagePump::Delegate {
// If message_histogram_ is NULL, this is a no-op.
void HistogramEvent(int event);
- static const LinearHistogram::DescriptionPair event_descriptions_[];
- static bool enable_histogrammer_;
-
Type type_;
// A list of tasks that need to be processed by this instance. Note that
diff --git a/base/message_loop_proxy_impl_unittest.cc b/base/message_loop_proxy_impl_unittest.cc
index 5fe341c..a3cb800 100644
--- a/base/message_loop_proxy_impl_unittest.cc
+++ b/base/message_loop_proxy_impl_unittest.cc
@@ -4,6 +4,7 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy_impl.h"
+#include "base/scoped_ptr.h"
#include "base/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h
index 62db5dc..f7dabef 100644
--- a/base/observer_list_threadsafe.h
+++ b/base/observer_list_threadsafe.h
@@ -5,8 +5,9 @@
#ifndef BASE_OBSERVER_LIST_THREADSAFE_H_
#define BASE_OBSERVER_LIST_THREADSAFE_H_
-#include <vector>
#include <algorithm>
+#include <map>
+#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
diff --git a/base/weak_ptr_unittest.cc b/base/weak_ptr_unittest.cc
index 0713983..b808401 100644
--- a/base/weak_ptr_unittest.cc
+++ b/base/weak_ptr_unittest.cc
@@ -5,6 +5,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "base/message_loop.h"
#include "base/thread.h"
+#include "base/scoped_ptr.h"
#include "base/weak_ptr.h"
namespace base {
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index bf676e6..32a4fec 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/histogram.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_dll_resource.h"
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index 6a66e98..42963df 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete.h"
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 9ec2c3a..f59dc26 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -19,6 +19,7 @@
#include <string>
#include <vector>
+#include "base/scoped_ptr.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history_types.h"
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 495ce1c..5e3e37e 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -10,6 +10,7 @@
#include "app/resource_bundle.h"
#include "base/env_var.h"
#include "base/event_recorder.h"
+#include "base/histogram.h"
#include "base/path_service.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/automation/automation_provider.h"
diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h
index f3251f0..0e31f25 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -96,6 +96,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/task.h"
class CancelableRequestBase;
diff --git a/chrome/browser/chrome_thread_unittest.cc b/chrome/browser/chrome_thread_unittest.cc
index 2284d3b..034f0d8 100644
--- a/chrome/browser/chrome_thread_unittest.cc
+++ b/chrome/browser/chrome_thread_unittest.cc
@@ -4,6 +4,7 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/chrome_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index e32e9b8..8ae86d6 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/string_util.h"
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index ccc2770..61b0aa3 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -7,6 +7,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "app/text_elider.h"
+#include "base/histogram.h"
#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/browser/cocoa/external_protocol_dialog.mm b/chrome/browser/cocoa/external_protocol_dialog.mm
index c729cbf..dc3ca24 100644
--- a/chrome/browser/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/cocoa/external_protocol_dialog.mm
@@ -5,6 +5,7 @@
#import "chrome/browser/cocoa/external_protocol_dialog.h"
#include "app/l10n_util_mac.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.h b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.h
index b4987b8..b839cc7 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.h
+++ b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.h
@@ -23,6 +23,7 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/debugger/devtools_remote.h"
diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h
index dee3600..6ee8f89 100644
--- a/chrome/browser/download/download_util.h
+++ b/chrome/browser/download/download_util.h
@@ -11,7 +11,6 @@
#include <string>
#include "base/basictypes.h"
-#include "base/task.h"
#include "gfx/native_widget_types.h"
#if defined(TOOLKIT_VIEWS)
@@ -30,23 +29,6 @@ class SkBitmap;
namespace download_util {
-// DownloadProgressTask --------------------------------------------------------
-
-// A class for managing the timed progress animations for a download view. The
-// view must implement an UpdateDownloadProgress() method.
-template<class DownloadView>
-class DownloadProgressTask : public Task {
- public:
- explicit DownloadProgressTask(DownloadView* view) : view_(view) {}
- virtual ~DownloadProgressTask() {}
- virtual void Run() {
- view_->UpdateDownloadProgress();
- }
- private:
- DownloadView* view_;
- DISALLOW_COPY_AND_ASSIGN(DownloadProgressTask);
-};
-
// Download opening ------------------------------------------------------------
// Whether it is OK to open this download.
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index 810a8fc..9ab011b 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -9,7 +9,6 @@
#include "base/file_path.h"
#include "base/ref_counted.h"
-#include "base/task.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index f7733c3..6977fb4 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -10,7 +10,6 @@
#include <vector>
#include "base/linked_ptr.h"
-#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/pref_service.h"
#include "chrome/common/extensions/extension.h"
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index c3b1907..3985704 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
+#include "base/histogram.h"
#include "base/rand_util.h"
#include "base/sha2.h"
#include "base/stl_util-inl.h"
diff --git a/chrome/browser/gears_integration.cc b/chrome/browser/gears_integration.cc
index 5cfad85..d1f13cf 100644
--- a/chrome/browser/gears_integration.cc
+++ b/chrome/browser/gears_integration.cc
@@ -10,6 +10,7 @@
#include "base/base64.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/chrome_plugin_host.h"
#include "chrome/common/chrome_plugin_util.h"
diff --git a/chrome/browser/geolocation/access_token_store.h b/chrome/browser/geolocation/access_token_store.h
index 8ecc81c..1002044 100644
--- a/chrome/browser/geolocation/access_token_store.h
+++ b/chrome/browser/geolocation/access_token_store.h
@@ -17,7 +17,6 @@
#include "base/ref_counted.h"
#include "base/string16.h"
-#include "base/task.h"
#include "chrome/browser/cancelable_request.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/google_url_tracker.h b/chrome/browser/google_url_tracker.h
index 6cd8b2f..5158ec8 100644
--- a/chrome/browser/google_url_tracker.h
+++ b/chrome/browser/google_url_tracker.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/scoped_ptr.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index 1a4c9b9..6f0791b 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -12,6 +12,7 @@
#include "app/text_elider.h"
#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/histogram.h"
#include "base/string_util.h"
#include "base/time.h"
#include "chrome/browser/browser.h"
diff --git a/chrome/browser/idle.h b/chrome/browser/idle.h
index e850dbe..4fe750f 100644
--- a/chrome/browser/idle.h
+++ b/chrome/browser/idle.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_IDLE_H_
#define CHROME_BROWSER_IDLE_H_
-#include "base/task.h"
-
enum IdleState {
IDLE_STATE_ACTIVE = 0,
IDLE_STATE_IDLE = 1, // No activity within threshold.
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index 2df6b68..caa5998 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "chrome/browser/browser_process_sub_thread.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/common/net/predictor_common.h"
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index 5106912..5c38d97 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/file_version_info.h"
+#include "base/histogram.h"
#include "base/process_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_child_process_host.h"
diff --git a/chrome/browser/net/chrome_net_log.h b/chrome/browser/net/chrome_net_log.h
index 092be8d..3d94ac6 100644
--- a/chrome/browser/net/chrome_net_log.h
+++ b/chrome/browser/net/chrome_net_log.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_NET_CHROME_NET_LOG_H_
#include "base/observer_list.h"
+#include "base/scoped_ptr.h"
#include "net/base/net_log.h"
class PassiveLogCollector;
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 28db8a9..c54794c 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
+#include "base/histogram.h"
#include "base/task.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_edit_view.h"
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index a9c8bb6..8e14707 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -14,7 +14,6 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index e21f865..640ffdb 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "chrome/common/notification_registrar.h"
#include "gfx/native_widget_types.h"
diff --git a/chrome/browser/profile_import_process_host.h b/chrome/browser/profile_import_process_host.h
index 878d972..a4b7a2a 100644
--- a/chrome/browser/profile_import_process_host.h
+++ b/chrome/browser/profile_import_process_host.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
-#include "base/task.h"
#include "base/values.h"
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/chrome_thread.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
index b322c95..73f991d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
@@ -6,6 +6,7 @@
#include "base/auto_reset.h"
#include "base/file_util.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/sha2.h"
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index cbd5dc0..802d88c 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/file_util.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/pickle.h"
#include "base/scoped_vector.h"
diff --git a/chrome/browser/spellcheck_host.h b/chrome/browser/spellcheck_host.h
index c0382c8..da6305d 100644
--- a/chrome/browser/spellcheck_host.h
+++ b/chrome/browser/spellcheck_host.h
@@ -11,6 +11,7 @@
#include "base/file_path.h"
#include "base/platform_file.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/common/net/url_fetcher.h"
diff --git a/chrome/browser/sync/util/extensions_activity_monitor.h b/chrome/browser/sync/util/extensions_activity_monitor.h
index 9f5a1a3..a1e36f2 100644
--- a/chrome/browser/sync/util/extensions_activity_monitor.h
+++ b/chrome/browser/sync/util/extensions_activity_monitor.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
#define CHROME_BROWSER_SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_
+#include <map>
+
#include "base/lock.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 1ca430e..b1fa79e 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/histogram.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 3800685..348c86d 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -12,6 +12,7 @@
#include "app/theme_provider.h"
#include "base/callback.h"
#include "base/file_path.h"
+#include "base/histogram.h"
#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/common/desktop_notifications/active_notification_tracker.cc b/chrome/common/desktop_notifications/active_notification_tracker.cc
index 0bfff59..9822711 100644
--- a/chrome/common/desktop_notifications/active_notification_tracker.cc
+++ b/chrome/common/desktop_notifications/active_notification_tracker.cc
@@ -5,6 +5,7 @@
#include "chrome/common/desktop_notifications/active_notification_tracker.h"
#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotification.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotificationPermissionCallback.h"
diff --git a/chrome/common/net/gaia/gaia_authenticator2.h b/chrome/common/net/gaia/gaia_authenticator2.h
index ac44efa..0e6c203c 100644
--- a/chrome/common/net/gaia/gaia_authenticator2.h
+++ b/chrome/common/net/gaia/gaia_authenticator2.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/scoped_ptr.h"
#include "chrome/common/net/gaia/gaia_auth_consumer.h"
#include "chrome/common/net/url_fetcher.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/renderer/gpu_channel_host.h b/chrome/renderer/gpu_channel_host.h
index 4b982bf..d697fd1 100644
--- a/chrome/renderer/gpu_channel_host.h
+++ b/chrome/renderer/gpu_channel_host.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/hash_tables.h"
+#include "base/scoped_ptr.h"
#include "chrome/common/message_router.h"
#include "gfx/native_widget_types.h"
#include "gfx/size.h"
diff --git a/chrome/service/cloud_print/job_status_updater.h b/chrome/service/cloud_print/job_status_updater.h
index ed4ab21..68c0fc8 100644
--- a/chrome/service/cloud_print/job_status_updater.h
+++ b/chrome/service/cloud_print/job_status_updater.h
@@ -9,6 +9,7 @@
#include "base/file_path.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/thread.h"
#include "chrome/service/cloud_print/print_system.h"
#include "chrome/common/net/url_fetcher.h"
diff --git a/chrome/service/service_process.h b/chrome/service/service_process.h
index 2dfb413..bbd30e8 100644
--- a/chrome/service/service_process.h
+++ b/chrome/service/service_process.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/thread.h"
class CloudPrintProxy;
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h
index 7610d02..31b8ad4 100644
--- a/ipc/ipc_channel_win.h
+++ b/ipc/ipc_channel_win.h
@@ -11,6 +11,7 @@
#include <string>
#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
class NonThreadSafe;
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 2566f9b..a542a8c 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/platform_thread.h"
+#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
diff --git a/media/base/filters.h b/media/base/filters.h
index 80a3bd2..8879233 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -31,6 +31,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/time.h"
+#include "base/scoped_ptr.h"
#include "media/base/media_format.h"
namespace media {
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 327b64d..92bec7a 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -13,6 +13,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/thread.h"
#include "base/time.h"
#include "media/base/clock_impl.h"
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 1cacdd1..df407b5 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -5,6 +5,7 @@
#include "media/base/video_frame.h"
#include "base/format_macros.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "media/base/buffers.h"
#include "media/base/mock_filters.h"
diff --git a/media/filters/ffmpeg_glue_unittest.cc b/media/filters/ffmpeg_glue_unittest.cc
index 3bf65e4..c2f0f6b 100644
--- a/media/filters/ffmpeg_glue_unittest.cc
+++ b/media/filters/ffmpeg_glue_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/scoped_ptr.h"
#include "media/base/mock_ffmpeg.h"
#include "media/base/mock_filters.h"
#include "media/ffmpeg/ffmpeg_common.h"
diff --git a/media/filters/video_renderer_base.h b/media/filters/video_renderer_base.h
index a0bb0f4..c00dc52 100644
--- a/media/filters/video_renderer_base.h
+++ b/media/filters/video_renderer_base.h
@@ -19,6 +19,7 @@
#include "base/condition_variable.h"
#include "base/lock.h"
+#include "base/scoped_ptr.h"
#include "media/base/filters.h"
#include "media/base/video_frame.h"
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index 2f95f7c..cad2d26 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/time.h"
#include "net/base/net_log.h"
namespace net {
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index 2036260..ba91db2 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -17,6 +17,7 @@
#include "base/callback.h"
#include "base/eintr_wrapper.h"
#include "base/file_path.h"
+#include "base/histogram.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc
index 8b7f090..a50e7aa 100644
--- a/net/base/file_stream_win.cc
+++ b/net/base/file_stream_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/file_path.h"
+#include "base/histogram.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "net/base/net_errors.h"
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 5685fc4..9b19436 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -17,6 +17,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/debug_util.h"
+#include "base/histogram.h"
#include "base/lock.h"
#include "base/message_loop.h"
#include "base/stl_util-inl.h"
diff --git a/net/base/listen_socket_unittest.h b/net/base/listen_socket_unittest.h
index 7adea1e..d43364a 100644
--- a/net/base/listen_socket_unittest.h
+++ b/net/base/listen_socket_unittest.h
@@ -16,6 +16,7 @@
#include <arpa/inet.h>
#endif
+#include "base/scoped_ptr.h"
#include "base/thread.h"
#include "base/basictypes.h"
#include "base/message_loop.h"
diff --git a/net/base/net_log.cc b/net/base/net_log.cc
index ace4a53..bd62f91 100644
--- a/net/base/net_log.cc
+++ b/net/base/net_log.cc
@@ -4,6 +4,7 @@
#include "net/base/net_log.h"
#include "base/string_util.h"
+#include "base/time.h"
#include "base/values.h"
namespace net {
diff --git a/net/base/net_log.h b/net/base/net_log.h
index 2f82ed4..266b93a 100644
--- a/net/base/net_log.h
+++ b/net/base/net_log.h
@@ -10,11 +10,13 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
-#include "base/time.h"
class Value;
+namespace base {
+class TimeTicks;
+}
+
namespace net {
// NetLog is the destination for log messages generated by the network stack.
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index f60afcc..c7b6a6f 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -33,6 +33,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/histogram.h"
#include "base/i18n/file_util_icu.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/i18n/time_formatting.h"
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index f919898..ad8c939 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/time.h"
#include "net/base/completion_callback.h"
#include "net/base/net_log.h"
#include "net/http/http_auth.h"
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 5dee33c..a613f6a9 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
diff --git a/net/server/http_listen_socket.cc b/net/server/http_listen_socket.cc
index 7711cd6..16c664e 100644
--- a/net/server/http_listen_socket.cc
+++ b/net/server/http_listen_socket.cc
@@ -8,6 +8,8 @@
#include <arpa/inet.h>
#endif
+#include <map>
+
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/md5.h"
diff --git a/net/server/http_server_request_info.h b/net/server/http_server_request_info.h
index 64f0a78a..84f767f 100644
--- a/net/server/http_server_request_info.h
+++ b/net/server/http_server_request_info.h
@@ -6,6 +6,7 @@
#define NET_SERVER_HTTP_SERVER_REQUEST_INFO_H_
#include <string>
+#include <map>
#include "net/http/http_request_info.h"
diff --git a/net/tools/fetch/http_listen_socket.cc b/net/tools/fetch/http_listen_socket.cc
index e135322..d0d6b97 100644
--- a/net/tools/fetch/http_listen_socket.cc
+++ b/net/tools/fetch/http_listen_socket.cc
@@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "net/tools/fetch/http_listen_socket.h"
+
+#include <map>
+
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
-#include "net/tools/fetch/http_listen_socket.h"
#include "net/tools/fetch/http_server_request_info.h"
#include "net/tools/fetch/http_server_response_info.h"
diff --git a/net/tools/fetch/http_server_request_info.h b/net/tools/fetch/http_server_request_info.h
index 239d3b9..fb45bdb 100644
--- a/net/tools/fetch/http_server_request_info.h
+++ b/net/tools/fetch/http_server_request_info.h
@@ -5,6 +5,7 @@
#ifndef NET_BASE_TOOLS_HTTP_SERVER_REQUEST_INFO_H_
#define NET_BASE_TOOLS_HTTP_SERVER_REQUEST_INFO_H_
+#include <map>
#include <string>
#include "net/http/http_request_info.h"
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 59aa9c4..7256ec0 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -10,12 +10,10 @@
#include <vector>
#include "base/leak_tracker.h"
-#include "base/linked_list.h"
#include "base/linked_ptr.h"
#include "base/logging.h"
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_states.h"
#include "net/base/net_log.h"
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 486d8c0..4e737ba 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -4,6 +4,7 @@
#include "net/url_request/url_request_job.h"
+#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "net/base/auth.h"
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 42844ea..e8794dc 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -58,6 +58,7 @@
#include "base/lock.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
#include "base/waitable_event.h"
#include "gfx/rect.h"
#include "gfx/size.h"
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index bf776f6..8a09562 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -9,6 +9,7 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/process_util.h"
+#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/time.h"
#include "net/base/data_url.h"