summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base.gyp2
-rw-r--r--base/base.gypi1
-rw-r--r--base/callback.h252
-rw-r--r--base/callback_unittest.cc (renamed from base/task_unittest.cc)6
-rw-r--r--base/observer_list_threadsafe.h1
-rw-r--r--base/task.h242
-rw-r--r--chrome/browser/autocomplete/history_contents_provider.cc1
-rw-r--r--chrome/browser/autocomplete/search_provider.cc1
-rw-r--r--chrome/browser/automation/automation_provider.cc1
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer.cc1
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc1
-rw-r--r--chrome/browser/browser_about_handler.cc1
-rw-r--r--chrome/browser/browsing_data_database_helper.cc1
-rw-r--r--chrome/browser/browsing_data_database_helper.h2
-rw-r--r--chrome/browser/browsing_data_local_storage_helper.h3
-rw-r--r--chrome/browser/browsing_data_local_storage_helper_unittest.cc1
-rw-r--r--chrome/browser/browsing_data_remover.cc1
-rw-r--r--chrome/browser/cancelable_request.h1
-rw-r--r--chrome/browser/chromeos/login/login_manager_view.cc1
-rw-r--r--chrome/browser/chromeos/version_loader.h1
-rw-r--r--chrome/browser/cocoa/download_item_mac.mm1
-rw-r--r--chrome/browser/cocoa/history_menu_bridge.mm1
-rw-r--r--chrome/browser/cookies_tree_model.cc1
-rw-r--r--chrome/browser/dom_ui/dom_ui.h2
-rw-r--r--chrome/browser/dom_ui/dom_ui_favicon_source.cc1
-rw-r--r--chrome/browser/dom_ui/dom_ui_thumbnail_source.cc1
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.cc1
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc1
-rw-r--r--chrome/browser/dom_ui/fileicon_source.cc1
-rw-r--r--chrome/browser/dom_ui/history_ui.cc1
-rw-r--r--chrome/browser/dom_ui/html_dialog_ui.cc1
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.cc1
-rw-r--r--chrome/browser/dom_ui/new_tab_page_sync_handler.cc1
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc1
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.cc1
-rw-r--r--chrome/browser/dom_ui/tips_handler.cc1
-rw-r--r--chrome/browser/download/download_manager.cc1
-rw-r--r--chrome/browser/extensions/execute_code_in_tab_function.cc1
-rw-r--r--chrome/browser/extensions/extension_accessibility_api.h1
-rw-r--r--chrome/browser/extensions/extension_history_api.cc1
-rw-r--r--chrome/browser/extensions/extensions_ui.cc1
-rw-r--r--chrome/browser/extensions/file_reader.h2
-rw-r--r--chrome/browser/extensions/file_reader_unittest.cc1
-rw-r--r--chrome/browser/fav_icon_helper.cc1
-rw-r--r--chrome/browser/fav_icon_helper.h1
-rw-r--r--chrome/browser/gears_integration.h2
-rw-r--r--chrome/browser/gtk/accessibility_event_router_gtk.cc1
-rw-r--r--chrome/browser/gtk/download_item_gtk.cc1
-rw-r--r--chrome/browser/gtk/list_store_favicon_loader.cc1
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc1
-rw-r--r--chrome/browser/gtk/options/url_picker_dialog_gtk.h2
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc1
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_gtk.h1
-rw-r--r--chrome/browser/history/history.cc1
-rw-r--r--chrome/browser/history/history.h1
-rw-r--r--chrome/browser/history/history_querying_unittest.cc1
-rw-r--r--chrome/browser/history/history_unittest.cc1
-rw-r--r--chrome/browser/icon_manager.h1
-rw-r--r--chrome/browser/jumplist.cc1
-rw-r--r--chrome/browser/mock_browsing_data_database_helper.cc2
-rw-r--r--chrome/browser/mock_browsing_data_database_helper.h2
-rw-r--r--chrome/browser/mock_browsing_data_local_storage_helper.cc3
-rw-r--r--chrome/browser/mock_browsing_data_local_storage_helper.h2
-rw-r--r--chrome/browser/page_info_model.cc1
-rw-r--r--chrome/browser/possible_url_model.cc1
-rw-r--r--chrome/browser/renderer_host/render_view_host_notification_task.h1
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc1
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.h3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.h2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store.h1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_file.h1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_sqlite.h1
-rw-r--r--chrome/browser/search_engines/template_url_model_unittest.cc1
-rw-r--r--chrome/browser/search_engines/template_url_table_model.cc1
-rw-r--r--chrome/browser/sessions/base_session_service.h2
-rw-r--r--chrome/browser/sessions/session_restore.cc1
-rw-r--r--chrome/browser/sessions/session_service.cc1
-rw-r--r--chrome/browser/sessions/session_service.h1
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc1
-rw-r--r--chrome/browser/sync/engine/model_changing_syncer_command.cc1
-rwxr-xr-xchrome/browser/sync/engine/syncer_unittest.cc1
-rw-r--r--chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc1
-rw-r--r--chrome/browser/sync/glue/data_type_controller.h2
-rw-r--r--chrome/browser/sync/glue/database_model_worker_unittest.cc1
-rw-r--r--chrome/browser/sync/glue/preference_data_type_controller_unittest.cc1
-rw-r--r--chrome/browser/sync/glue/ui_model_worker_unittest.cc1
-rw-r--r--chrome/browser/sync/profile_sync_service.cc1
-rwxr-xr-xchrome/browser/sync/sync_setup_flow.cc1
-rw-r--r--chrome/browser/sync/util/closure.h2
-rw-r--r--chrome/browser/thumbnail_store.cc1
-rwxr-xr-xchrome/browser/views/about_chrome_view.cc1
-rw-r--r--chrome/browser/views/create_application_shortcut_view.cc1
-rw-r--r--chrome/browser/views/download_item_view.cc1
-rw-r--r--chrome/browser/views/options/general_page_view.cc1
-rw-r--r--chrome/browser/views/select_file_dialog.cc1
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc1
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.cc1
-rw-r--r--chrome/browser/views/tabs/dragged_tab_view.h1
-rw-r--r--chrome/browser/web_applications/web_app.cc1
-rw-r--r--chrome/browser/web_applications/web_app.h2
-rw-r--r--chrome/browser/worker_host/message_port_dispatcher.cc1
-rw-r--r--chrome/browser/worker_host/message_port_dispatcher.h1
-rw-r--r--chrome/browser/worker_host/worker_process_host.cc1
-rw-r--r--chrome/browser/worker_host/worker_process_host.h2
-rw-r--r--chrome/common/appcache/appcache_dispatcher_host.cc1
-rw-r--r--chrome/plugin/command_buffer_stub.cc1
-rw-r--r--chrome/renderer/media/audio_renderer_impl_unittest.cc1
-rw-r--r--chrome/renderer/render_view.cc1
-rw-r--r--chrome_frame/chrome_frame_automation.cc1
-rw-r--r--chrome_frame/sync_msg_reply_dispatcher.h1
-rw-r--r--chrome_frame/test/automation_client_mock.cc1
-rw-r--r--gpu/command_buffer/client/cmd_buffer_helper_test.cc1
-rw-r--r--gpu/command_buffer/client/fenced_allocator_test.cc1
-rw-r--r--gpu/command_buffer/client/gles2_demo.cc1
-rw-r--r--gpu/command_buffer/service/command_buffer_service.cc1
-rw-r--r--gpu/command_buffer/service/command_buffer_service.h1
-rw-r--r--gpu/command_buffer/service/command_buffer_service_unittest.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_mock.h1
-rw-r--r--gpu/command_buffer/service/gpu_processor.cc1
-rw-r--r--gpu/command_buffer/service/gpu_processor.h2
-rw-r--r--gpu/demos/framework/window.cc1
-rw-r--r--media/base/callback.h7
-rw-r--r--media/base/filters.h1
-rw-r--r--media/base/mock_filters.h7
-rw-r--r--media/base/mock_reader.h7
-rw-r--r--media/base/pipeline.h2
-rw-r--r--media/base/pipeline_impl.cc1
-rw-r--r--media/base/pipeline_impl_unittest.cc1
-rw-r--r--media/filters/audio_renderer_algorithm_base.h2
-rw-r--r--media/filters/audio_renderer_algorithm_ola_unittest.cc1
-rw-r--r--media/filters/audio_renderer_base.cc1
-rw-r--r--media/filters/audio_renderer_base_unittest.cc1
-rw-r--r--media/filters/decoder_base.h7
-rw-r--r--media/filters/ffmpeg_demuxer.cc1
-rw-r--r--media/filters/ffmpeg_demuxer.h1
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc1
-rw-r--r--media/filters/file_data_source_unittest.cc1
-rw-r--r--media/filters/omx_video_decode_engine.cc1
-rw-r--r--media/filters/omx_video_decode_engine.h1
-rw-r--r--media/filters/omx_video_decoder.cc1
-rw-r--r--media/filters/video_decoder_impl_unittest.cc1
-rw-r--r--media/filters/video_renderer_base.cc7
-rw-r--r--media/filters/video_renderer_base_unittest.cc1
-rw-r--r--media/omx/omx_codec.cc7
-rw-r--r--media/omx/omx_codec.h8
-rw-r--r--media/omx/omx_codec_unittest.cc1
-rw-r--r--media/omx/omx_output_sink.h8
-rw-r--r--media/tools/omx_test/omx_test.cc7
-rw-r--r--media/tools/wav_ola_test/wav_ola_test.cc1
-rw-r--r--net/base/completion_callback.h2
-rw-r--r--net/base/cookie_policy.h2
-rw-r--r--net/base/file_stream_posix.cc7
-rw-r--r--net/base/file_stream_unittest.cc7
-rw-r--r--net/base/static_cookie_policy.h2
-rw-r--r--net/base/test_completion_callback.h1
-rw-r--r--net/disk_cache/disk_cache_test_util.h2
-rw-r--r--net/http/http_cache.cc1
-rw-r--r--net/http/http_transaction.h2
-rw-r--r--net/http/http_transaction_unittest.h1
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc3
-rw-r--r--net/socket/socket_test_util.h1
-rw-r--r--net/socket/ssl_client_socket.h2
-rw-r--r--net/socket/tcp_client_socket_pool_unittest.cc1
-rw-r--r--net/socket_stream/socket_stream_unittest.cc1
-rw-r--r--net/websockets/websocket_unittest.cc2
-rw-r--r--sandbox/src/crosscall_server.h1
-rw-r--r--sandbox/src/sandbox_policy_base.cc1
-rw-r--r--sandbox/src/sharedmem_ipc_server.cc1
-rw-r--r--views/controls/scrollbar/bitmap_scroll_bar.cc1
-rw-r--r--views/repeat_controller.h1
-rw-r--r--webkit/appcache/appcache_host.h2
-rw-r--r--webkit/appcache/appcache_host_unittest.cc1
-rw-r--r--webkit/appcache/appcache_response.h1
-rw-r--r--webkit/appcache/appcache_storage_impl.h1
-rw-r--r--webkit/glue/alt_error_page_resource_fetcher.cc1
-rw-r--r--webkit/glue/alt_error_page_resource_fetcher.h2
-rw-r--r--webkit/glue/cpp_bound_class.h2
-rw-r--r--webkit/glue/image_resource_fetcher.cc1
-rw-r--r--webkit/glue/image_resource_fetcher.h1
-rw-r--r--webkit/glue/media/buffered_data_source.cc7
-rw-r--r--webkit/glue/media/buffered_data_source.h7
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc1
-rw-r--r--webkit/glue/media/simple_data_source_unittest.cc1
-rw-r--r--webkit/glue/resource_fetcher.h1
-rw-r--r--webkit/glue/resource_fetcher_unittest.cc1
-rw-r--r--webkit/glue/webmediaplayer_impl.cc1
-rw-r--r--webkit/tools/test_shell/accessibility_ui_element.cc1
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc7
195 files changed, 503 insertions, 313 deletions
diff --git a/base/base.gyp b/base/base.gyp
index f4720b4..478b0ca 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -52,6 +52,7 @@
'atomicops_unittest.cc',
'base64_unittest.cc',
'bits_unittest.cc',
+ 'callback_unittest.cc',
'cancellation_flag_unittest.cc',
'command_line_unittest.cc',
'condition_variable_unittest.cc',
@@ -114,7 +115,6 @@
'sys_info_unittest.cc',
'sys_string_conversions_mac_unittest.mm',
'sys_string_conversions_unittest.cc',
- 'task_unittest.cc',
'thread_collision_warner_unittest.cc',
'thread_local_storage_unittest.cc',
'thread_local_unittest.cc',
diff --git a/base/base.gypi b/base/base.gypi
index 9cd768b..66094b9d 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -40,6 +40,7 @@
'basictypes.h',
'bits.h',
'bzip2_error_handler.cc',
+ 'callback.h',
'cancellation_flag.h',
'cancellation_flag.cc',
'chrome_application_mac.h',
diff --git a/base/callback.h b/base/callback.h
new file mode 100644
index 0000000..17a1adc
--- /dev/null
+++ b/base/callback.h
@@ -0,0 +1,252 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_CALLBACK_H_
+#define BASE_CALLBACK_H_
+
+#include "base/tuple.h"
+#include "base/raw_scoped_refptr_mismatch_checker.h"
+
+// Callback --------------------------------------------------------------------
+//
+// A Callback is like a Task but with unbound parameters. It is basically an
+// object-oriented function pointer.
+//
+// Callbacks are designed to work with Tuples. A set of helper functions and
+// classes is provided to hide the Tuple details from the consumer. Client
+// code will generally work with the CallbackRunner base class, which merely
+// provides a Run method and is returned by the New* functions. This allows
+// users to not care which type of class implements the callback, only that it
+// has a certain number and type of arguments.
+//
+// The implementation of this is done by CallbackImpl, which inherits
+// CallbackStorage to store the data. This allows the storage of the data
+// (requiring the class type T) to be hidden from users, who will want to call
+// this regardless of the implementor's type T.
+//
+// Note that callbacks currently have no facility for cancelling or abandoning
+// them. We currently handle this at a higher level for cases where this is
+// necessary. The pointer in a callback must remain valid until the callback
+// is made.
+//
+// Like Task, the callback executor is responsible for deleting the callback
+// pointer once the callback has executed.
+//
+// Example client usage:
+// void Object::DoStuff(int, string);
+// Callback2<int, string>::Type* callback =
+// NewCallback(obj, &Object::DoStuff);
+// callback->Run(5, string("hello"));
+// delete callback;
+// or, equivalently, using tuples directly:
+// CallbackRunner<Tuple2<int, string> >* callback =
+// NewCallback(obj, &Object::DoStuff);
+// callback->RunWithParams(MakeTuple(5, string("hello")));
+//
+// There is also a 0-args version that returns a value. Example:
+// int Object::GetNextInt();
+// CallbackWithReturnValue<int>::Type* callback =
+// NewCallbackWithReturnValue(obj, &Object::GetNextInt);
+// int next_int = callback->Run();
+// delete callback;
+
+// Base for all Callbacks that handles storage of the pointers.
+template <class T, typename Method>
+class CallbackStorage {
+ public:
+ CallbackStorage(T* obj, Method meth) : obj_(obj), meth_(meth) {
+ }
+
+ protected:
+ T* obj_;
+ Method meth_;
+};
+
+// Interface that is exposed to the consumer, that does the actual calling
+// of the method.
+template <typename Params>
+class CallbackRunner {
+ public:
+ typedef Params TupleType;
+
+ virtual ~CallbackRunner() {}
+ virtual void RunWithParams(const Params& params) = 0;
+
+ // Convenience functions so callers don't have to deal with Tuples.
+ inline void Run() {
+ RunWithParams(Tuple0());
+ }
+
+ template <typename Arg1>
+ inline void Run(const Arg1& a) {
+ RunWithParams(Params(a));
+ }
+
+ template <typename Arg1, typename Arg2>
+ inline void Run(const Arg1& a, const Arg2& b) {
+ RunWithParams(Params(a, b));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3>
+ inline void Run(const Arg1& a, const Arg2& b, const Arg3& c) {
+ RunWithParams(Params(a, b, c));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+ inline void Run(const Arg1& a, const Arg2& b, const Arg3& c, const Arg4& d) {
+ RunWithParams(Params(a, b, c, d));
+ }
+
+ template <typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5>
+ inline void Run(const Arg1& a, const Arg2& b, const Arg3& c,
+ const Arg4& d, const Arg5& e) {
+ RunWithParams(Params(a, b, c, d, e));
+ }
+};
+
+template <class T, typename Method, typename Params>
+class CallbackImpl : public CallbackStorage<T, Method>,
+ public CallbackRunner<Params> {
+ public:
+ CallbackImpl(T* obj, Method meth) : CallbackStorage<T, Method>(obj, meth) {
+ }
+ virtual void RunWithParams(const Params& params) {
+ // use "this->" to force C++ to look inside our templatized base class; see
+ // Effective C++, 3rd Ed, item 43, p210 for details.
+ DispatchToMethod(this->obj_, this->meth_, params);
+ }
+};
+
+// 0-arg implementation
+struct Callback0 {
+ typedef CallbackRunner<Tuple0> Type;
+};
+
+template <class T>
+typename Callback0::Type* NewCallback(T* object, void (T::*method)()) {
+ return new CallbackImpl<T, void (T::*)(), Tuple0 >(object, method);
+}
+
+// 1-arg implementation
+template <typename Arg1>
+struct Callback1 {
+ typedef CallbackRunner<Tuple1<Arg1> > Type;
+};
+
+template <class T, typename Arg1>
+typename Callback1<Arg1>::Type* NewCallback(T* object,
+ void (T::*method)(Arg1)) {
+ return new CallbackImpl<T, void (T::*)(Arg1), Tuple1<Arg1> >(object, method);
+}
+
+// 2-arg implementation
+template <typename Arg1, typename Arg2>
+struct Callback2 {
+ typedef CallbackRunner<Tuple2<Arg1, Arg2> > Type;
+};
+
+template <class T, typename Arg1, typename Arg2>
+typename Callback2<Arg1, Arg2>::Type* NewCallback(
+ T* object,
+ void (T::*method)(Arg1, Arg2)) {
+ return new CallbackImpl<T, void (T::*)(Arg1, Arg2),
+ Tuple2<Arg1, Arg2> >(object, method);
+}
+
+// 3-arg implementation
+template <typename Arg1, typename Arg2, typename Arg3>
+struct Callback3 {
+ typedef CallbackRunner<Tuple3<Arg1, Arg2, Arg3> > Type;
+};
+
+template <class T, typename Arg1, typename Arg2, typename Arg3>
+typename Callback3<Arg1, Arg2, Arg3>::Type* NewCallback(
+ T* object,
+ void (T::*method)(Arg1, Arg2, Arg3)) {
+ return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3),
+ Tuple3<Arg1, Arg2, Arg3> >(object, method);
+}
+
+// 4-arg implementation
+template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct Callback4 {
+ typedef CallbackRunner<Tuple4<Arg1, Arg2, Arg3, Arg4> > Type;
+};
+
+template <class T, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+typename Callback4<Arg1, Arg2, Arg3, Arg4>::Type* NewCallback(
+ T* object,
+ void (T::*method)(Arg1, Arg2, Arg3, Arg4)) {
+ return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3, Arg4),
+ Tuple4<Arg1, Arg2, Arg3, Arg4> >(object, method);
+}
+
+// 5-arg implementation
+template <typename Arg1, typename Arg2, typename Arg3,
+ typename Arg4, typename Arg5>
+struct Callback5 {
+ typedef CallbackRunner<Tuple5<Arg1, Arg2, Arg3, Arg4, Arg5> > Type;
+};
+
+template <class T, typename Arg1, typename Arg2,
+ typename Arg3, typename Arg4, typename Arg5>
+typename Callback5<Arg1, Arg2, Arg3, Arg4, Arg5>::Type* NewCallback(
+ T* object,
+ void (T::*method)(Arg1, Arg2, Arg3, Arg4, Arg5)) {
+ return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3, Arg4, Arg5),
+ Tuple5<Arg1, Arg2, Arg3, Arg4, Arg5> >(object, method);
+}
+
+// An UnboundMethod is a wrapper for a method where the actual object is
+// provided at Run dispatch time.
+template <class T, class Method, class Params>
+class UnboundMethod {
+ public:
+ UnboundMethod(Method m, const Params& p) : m_(m), p_(p) {
+ COMPILE_ASSERT((MethodUsesScopedRefptrCorrectly<Method, Params>::value),
+ badunboundmethodparams);
+ }
+ void Run(T* obj) const {
+ DispatchToMethod(obj, m_, p_);
+ }
+ private:
+ Method m_;
+ Params p_;
+};
+
+// Return value implementation with no args.
+template <typename ReturnValue>
+struct CallbackWithReturnValue {
+ class Type {
+ public:
+ virtual ~Type() {}
+ virtual ReturnValue Run() = 0;
+ };
+};
+
+template <class T, typename Method, typename ReturnValue>
+class CallbackWithReturnValueImpl
+ : public CallbackStorage<T, Method>,
+ public CallbackWithReturnValue<ReturnValue>::Type {
+ public:
+ CallbackWithReturnValueImpl(T* obj, Method meth)
+ : CallbackStorage<T, Method>(obj, meth) {}
+
+ virtual ReturnValue Run() {
+ return (this->obj_->*(this->meth_))();
+ }
+
+ protected:
+ virtual ~CallbackWithReturnValueImpl() {}
+};
+
+template <class T, typename ReturnValue>
+typename CallbackWithReturnValue<ReturnValue>::Type*
+NewCallbackWithReturnValue(T* object, ReturnValue (T::*method)()) {
+ return new CallbackWithReturnValueImpl<T, ReturnValue (T::*)(), ReturnValue>(
+ object, method);
+}
+
+#endif // BASE_CALLBACK_H
diff --git a/base/task_unittest.cc b/base/callback_unittest.cc
index 1fa7c9d..bc15927 100644
--- a/base/task_unittest.cc
+++ b/base/callback_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/callback.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +21,7 @@ class HelperObject {
} // namespace
-TEST(Task, OneArg) {
+TEST(Callback, OneArg) {
HelperObject obj;
scoped_ptr<Callback1<int*>::Type> callback(
NewCallback(&obj, &HelperObject::GetNextNumberArg));
@@ -31,7 +31,7 @@ TEST(Task, OneArg) {
EXPECT_EQ(number, 1);
}
-TEST(Task, ReturnValue) {
+TEST(Callback, ReturnValue) {
HelperObject obj;
scoped_ptr<CallbackWithReturnValue<int>::Type> callback(
NewCallbackWithReturnValue(&obj, &HelperObject::GetNextNumber));
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h
index d0151f4..c0716dd 100644
--- a/base/observer_list_threadsafe.h
+++ b/base/observer_list_threadsafe.h
@@ -9,6 +9,7 @@
#include <algorithm>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/observer_list.h"
diff --git a/base/task.h b/base/task.h
index 91ec520..0af79a4 100644
--- a/base/task.h
+++ b/base/task.h
@@ -454,246 +454,4 @@ inline CancelableTask* NewRunnableFunction(Function function,
e));
}
-// Callback --------------------------------------------------------------------
-//
-// A Callback is like a Task but with unbound parameters. It is basically an
-// object-oriented function pointer.
-//
-// Callbacks are designed to work with Tuples. A set of helper functions and
-// classes is provided to hide the Tuple details from the consumer. Client
-// code will generally work with the CallbackRunner base class, which merely
-// provides a Run method and is returned by the New* functions. This allows
-// users to not care which type of class implements the callback, only that it
-// has a certain number and type of arguments.
-//
-// The implementation of this is done by CallbackImpl, which inherits
-// CallbackStorage to store the data. This allows the storage of the data
-// (requiring the class type T) to be hidden from users, who will want to call
-// this regardless of the implementor's type T.
-//
-// Note that callbacks currently have no facility for cancelling or abandoning
-// them. We currently handle this at a higher level for cases where this is
-// necessary. The pointer in a callback must remain valid until the callback
-// is made.
-//
-// Like Task, the callback executor is responsible for deleting the callback
-// pointer once the callback has executed.
-//
-// Example client usage:
-// void Object::DoStuff(int, string);
-// Callback2<int, string>::Type* callback =
-// NewCallback(obj, &Object::DoStuff);
-// callback->Run(5, string("hello"));
-// delete callback;
-// or, equivalently, using tuples directly:
-// CallbackRunner<Tuple2<int, string> >* callback =
-// NewCallback(obj, &Object::DoStuff);
-// callback->RunWithParams(MakeTuple(5, string("hello")));
-//
-// There is also a 0-args version that returns a value. Example:
-// int Object::GetNextInt();
-// CallbackWithReturnValue<int>::Type* callback =
-// NewCallbackWithReturnValue(obj, &Object::GetNextInt);
-// int next_int = callback->Run();
-// delete callback;
-
-// Base for all Callbacks that handles storage of the pointers.
-template <class T, typename Method>
-class CallbackStorage {
- public:
- CallbackStorage(T* obj, Method meth) : obj_(obj), meth_(meth) {
- }
-
- protected:
- T* obj_;
- Method meth_;
-};
-
-// Interface that is exposed to the consumer, that does the actual calling
-// of the method.
-template <typename Params>
-class CallbackRunner {
- public:
- typedef Params TupleType;
-
- virtual ~CallbackRunner() {}
- virtual void RunWithParams(const Params& params) = 0;
-
- // Convenience functions so callers don't have to deal with Tuples.
- inline void Run() {
- RunWithParams(Tuple0());
- }
-
- template <typename Arg1>
- inline void Run(const Arg1& a) {
- RunWithParams(Params(a));
- }
-
- template <typename Arg1, typename Arg2>
- inline void Run(const Arg1& a, const Arg2& b) {
- RunWithParams(Params(a, b));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3>
- inline void Run(const Arg1& a, const Arg2& b, const Arg3& c) {
- RunWithParams(Params(a, b, c));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
- inline void Run(const Arg1& a, const Arg2& b, const Arg3& c, const Arg4& d) {
- RunWithParams(Params(a, b, c, d));
- }
-
- template <typename Arg1, typename Arg2, typename Arg3,
- typename Arg4, typename Arg5>
- inline void Run(const Arg1& a, const Arg2& b, const Arg3& c,
- const Arg4& d, const Arg5& e) {
- RunWithParams(Params(a, b, c, d, e));
- }
-};
-
-template <class T, typename Method, typename Params>
-class CallbackImpl : public CallbackStorage<T, Method>,
- public CallbackRunner<Params> {
- public:
- CallbackImpl(T* obj, Method meth) : CallbackStorage<T, Method>(obj, meth) {
- }
- virtual void RunWithParams(const Params& params) {
- // use "this->" to force C++ to look inside our templatized base class; see
- // Effective C++, 3rd Ed, item 43, p210 for details.
- DispatchToMethod(this->obj_, this->meth_, params);
- }
-};
-
-// 0-arg implementation
-struct Callback0 {
- typedef CallbackRunner<Tuple0> Type;
-};
-
-template <class T>
-typename Callback0::Type* NewCallback(T* object, void (T::*method)()) {
- return new CallbackImpl<T, void (T::*)(), Tuple0 >(object, method);
-}
-
-// 1-arg implementation
-template <typename Arg1>
-struct Callback1 {
- typedef CallbackRunner<Tuple1<Arg1> > Type;
-};
-
-template <class T, typename Arg1>
-typename Callback1<Arg1>::Type* NewCallback(T* object,
- void (T::*method)(Arg1)) {
- return new CallbackImpl<T, void (T::*)(Arg1), Tuple1<Arg1> >(object, method);
-}
-
-// 2-arg implementation
-template <typename Arg1, typename Arg2>
-struct Callback2 {
- typedef CallbackRunner<Tuple2<Arg1, Arg2> > Type;
-};
-
-template <class T, typename Arg1, typename Arg2>
-typename Callback2<Arg1, Arg2>::Type* NewCallback(
- T* object,
- void (T::*method)(Arg1, Arg2)) {
- return new CallbackImpl<T, void (T::*)(Arg1, Arg2),
- Tuple2<Arg1, Arg2> >(object, method);
-}
-
-// 3-arg implementation
-template <typename Arg1, typename Arg2, typename Arg3>
-struct Callback3 {
- typedef CallbackRunner<Tuple3<Arg1, Arg2, Arg3> > Type;
-};
-
-template <class T, typename Arg1, typename Arg2, typename Arg3>
-typename Callback3<Arg1, Arg2, Arg3>::Type* NewCallback(
- T* object,
- void (T::*method)(Arg1, Arg2, Arg3)) {
- return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3),
- Tuple3<Arg1, Arg2, Arg3> >(object, method);
-}
-
-// 4-arg implementation
-template <typename Arg1, typename Arg2, typename Arg3, typename Arg4>
-struct Callback4 {
- typedef CallbackRunner<Tuple4<Arg1, Arg2, Arg3, Arg4> > Type;
-};
-
-template <class T, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
-typename Callback4<Arg1, Arg2, Arg3, Arg4>::Type* NewCallback(
- T* object,
- void (T::*method)(Arg1, Arg2, Arg3, Arg4)) {
- return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3, Arg4),
- Tuple4<Arg1, Arg2, Arg3, Arg4> >(object, method);
-}
-
-// 5-arg implementation
-template <typename Arg1, typename Arg2, typename Arg3,
- typename Arg4, typename Arg5>
-struct Callback5 {
- typedef CallbackRunner<Tuple5<Arg1, Arg2, Arg3, Arg4, Arg5> > Type;
-};
-
-template <class T, typename Arg1, typename Arg2,
- typename Arg3, typename Arg4, typename Arg5>
-typename Callback5<Arg1, Arg2, Arg3, Arg4, Arg5>::Type* NewCallback(
- T* object,
- void (T::*method)(Arg1, Arg2, Arg3, Arg4, Arg5)) {
- return new CallbackImpl<T, void (T::*)(Arg1, Arg2, Arg3, Arg4, Arg5),
- Tuple5<Arg1, Arg2, Arg3, Arg4, Arg5> >(object, method);
-}
-
-// An UnboundMethod is a wrapper for a method where the actual object is
-// provided at Run dispatch time.
-template <class T, class Method, class Params>
-class UnboundMethod {
- public:
- UnboundMethod(Method m, const Params& p) : m_(m), p_(p) {
- COMPILE_ASSERT((MethodUsesScopedRefptrCorrectly<Method, Params>::value),
- badunboundmethodparams);
- }
- void Run(T* obj) const {
- DispatchToMethod(obj, m_, p_);
- }
- private:
- Method m_;
- Params p_;
-};
-
-// Return value implementation with no args.
-template <typename ReturnValue>
-struct CallbackWithReturnValue {
- class Type {
- public:
- virtual ~Type() {}
- virtual ReturnValue Run() = 0;
- };
-};
-
-template <class T, typename Method, typename ReturnValue>
-class CallbackWithReturnValueImpl
- : public CallbackStorage<T, Method>,
- public CallbackWithReturnValue<ReturnValue>::Type {
- public:
- CallbackWithReturnValueImpl(T* obj, Method meth)
- : CallbackStorage<T, Method>(obj, meth) {}
-
- virtual ReturnValue Run() {
- return (this->obj_->*(this->meth_))();
- }
-
- protected:
- virtual ~CallbackWithReturnValueImpl() {}
-};
-
-template <class T, typename ReturnValue>
-typename CallbackWithReturnValue<ReturnValue>::Type*
-NewCallbackWithReturnValue(T* object, ReturnValue (T::*method)()) {
- return new CallbackWithReturnValueImpl<T, ReturnValue (T::*)(), ReturnValue>(
- object, method);
-}
-
-
#endif // BASE_TASK_H_
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc
index 0b3865e..ac81c31 100644
--- a/chrome/browser/autocomplete/history_contents_provider.cc
+++ b/chrome/browser/autocomplete/history_contents_provider.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/autocomplete/history_contents_provider.h"
+#include "base/callback.h"
#include "base/histogram.h"
#include "base/string_util.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index e1d8567..704e077 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/autocomplete/search_provider.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/message_loop.h"
#include "base/string_util.h"
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index be3a44e..e7a51432 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
+#include "base/callback.h"
#include "base/file_version_info.h"
#include "base/json/json_reader.h"
#include "base/keyboard_codes.h"
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
index f845b8a..40326c5 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/base64.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/platform_file.h"
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index f32ac74..3ea7171 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -7,6 +7,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/l10n_util.h"
#include "app/l10n_util_collator.h"
+#include "base/callback.h"
#include "base/scoped_vector.h"
#include "build/build_config.h"
#include "chrome/browser/bookmarks/bookmark_index.h"
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index a6764aa..f2095c5 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/file_version_info.h"
#include "base/histogram.h"
#include "base/i18n/number_formatting.h"
diff --git a/chrome/browser/browsing_data_database_helper.cc b/chrome/browser/browsing_data_database_helper.cc
index 47489a5..2898a77 100644
--- a/chrome/browser/browsing_data_database_helper.cc
+++ b/chrome/browser/browsing_data_database_helper.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/browsing_data_database_helper.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "chrome/browser/chrome_thread.h"
diff --git a/chrome/browser/browsing_data_database_helper.h b/chrome/browser/browsing_data_database_helper.h
index d126a54..2fa936b 100644
--- a/chrome/browser/browsing_data_database_helper.h
+++ b/chrome/browser/browsing_data_database_helper.h
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "webkit/database/database_tracker.h"
class Profile;
diff --git a/chrome/browser/browsing_data_local_storage_helper.h b/chrome/browser/browsing_data_local_storage_helper.h
index af423b9..9a82b9b 100644
--- a/chrome/browser/browsing_data_local_storage_helper.h
+++ b/chrome/browser/browsing_data_local_storage_helper.h
@@ -7,9 +7,10 @@
#include <string>
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
+#include "base/time.h"
class Profile;
diff --git a/chrome/browser/browsing_data_local_storage_helper_unittest.cc b/chrome/browser/browsing_data_local_storage_helper_unittest.cc
index 1664903..2f3a5a9 100644
--- a/chrome/browser/browsing_data_local_storage_helper_unittest.cc
+++ b/chrome/browser/browsing_data_local_storage_helper_unittest.cc
@@ -5,6 +5,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/ref_counted.h"
#include "chrome/browser/in_process_webkit/webkit_context.h"
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index a350ae5..c9283a2 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/browsing_data_remover.h"
+#include "base/callback.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/history/history.h"
diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h
index 514a0d7..2dc4b9b 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -90,6 +90,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/cancellation_flag.h"
#include "base/lock.h"
#include "base/logging.h"
diff --git a/chrome/browser/chromeos/login/login_manager_view.cc b/chrome/browser/chromeos/login/login_manager_view.cc
index b769627..3e95c2c 100644
--- a/chrome/browser/chromeos/login/login_manager_view.cc
+++ b/chrome/browser/chromeos/login/login_manager_view.cc
@@ -11,6 +11,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/keyboard_codes.h"
#include "base/logging.h"
diff --git a/chrome/browser/chromeos/version_loader.h b/chrome/browser/chromeos/version_loader.h
index 15c281f..cda36d3 100644
--- a/chrome/browser/chromeos/version_loader.h
+++ b/chrome/browser/chromeos/version_loader.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback.h"
#include "chrome/browser/cancelable_request.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
diff --git a/chrome/browser/cocoa/download_item_mac.mm b/chrome/browser/cocoa/download_item_mac.mm
index 25b4022..144b42d 100644
--- a/chrome/browser/cocoa/download_item_mac.mm
+++ b/chrome/browser/cocoa/download_item_mac.mm
@@ -4,6 +4,7 @@
#include "chrome/browser/cocoa/download_item_mac.h"
+#include "base/callback.h"
#include "chrome/browser/browser_process.h"
#import "chrome/browser/cocoa/download_item_controller.h"
#include "chrome/browser/cocoa/download_util_mac.h"
diff --git a/chrome/browser/cocoa/history_menu_bridge.mm b/chrome/browser/cocoa/history_menu_bridge.mm
index 7a580ee..30b4488 100644
--- a/chrome/browser/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/cocoa/history_menu_bridge.mm
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/cocoa/history_menu_bridge.h"
+#include "base/callback.h"
#include "base/sys_string_conversions.h"
#include "base/string_util.h"
#include "chrome/app/chrome_dll_resource.h" // IDC_HISTORY_MENU
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 0238c12..717ef27 100644
--- a/chrome/browser/cookies_tree_model.cc
+++ b/chrome/browser/cookies_tree_model.cc
@@ -12,6 +12,7 @@
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
#include "app/tree_node_model.h"
+#include "base/callback.h"
#include "base/linked_ptr.h"
#include "base/string_util.h"
#include "chrome/browser/in_process_webkit/webkit_context.h"
diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/dom_ui.h
index 5630597..fe1af1c1 100644
--- a/chrome/browser/dom_ui/dom_ui.h
+++ b/chrome/browser/dom_ui/dom_ui.h
@@ -9,8 +9,8 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/string16.h"
-#include "base/task.h"
#include "chrome/common/page_transition_types.h"
class DictionaryValue;
diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.cc b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
index 34af8fb..4ec0ce8 100644
--- a/chrome/browser/dom_ui/dom_ui_favicon_source.cc
+++ b/chrome/browser/dom_ui/dom_ui_favicon_source.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_ui/dom_ui_favicon_source.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "chrome/browser/profile.h"
#include "chrome/common/url_constants.h"
#include "grit/app_resources.h"
diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc
index 2194ff2..604b641 100644
--- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc
+++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc
@@ -6,6 +6,7 @@
#include "app/gfx/codec/jpeg_codec.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/thumbnail_store.h"
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.cc b/chrome/browser/dom_ui/downloads_dom_handler.cc
index 501faf0..c637b47 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.cc
+++ b/chrome/browser/dom_ui/downloads_dom_handler.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/thread.h"
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index 4d8e941..618573a 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/path_service.h"
diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc
index a5107d2..6be786c 100644
--- a/chrome/browser/dom_ui/fileicon_source.cc
+++ b/chrome/browser/dom_ui/fileicon_source.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_ui/fileicon_source.h"
#include "app/gfx/codec/png_codec.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/time_format.h"
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 2f31eb5..0019059 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/i18n/time_formatting.h"
#include "base/message_loop.h"
#include "base/singleton.h"
diff --git a/chrome/browser/dom_ui/html_dialog_ui.cc b/chrome/browser/dom_ui/html_dialog_ui.cc
index 4f7995d..739a4c4 100644
--- a/chrome/browser/dom_ui/html_dialog_ui.cc
+++ b/chrome/browser/dom_ui/html_dialog_ui.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/dom_ui/html_dialog_ui.h"
+#include "base/callback.h"
#include "base/singleton.h"
#include "base/values.h"
#include "chrome/browser/tab_contents/tab_contents.h"
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc
index d145638..805852e 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_ui/most_visited_handler.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/md5.h"
#include "base/singleton.h"
#include "base/string_util.h"
diff --git a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
index b4443fe..30c3172 100644
--- a/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
+++ b/chrome/browser/dom_ui/new_tab_page_sync_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/dom_ui/new_tab_page_sync_handler.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index db95029..2eb5702 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -9,6 +9,7 @@
#include <set>
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/histogram.h"
#include "base/singleton.h"
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index d4388e7..b9c63ef 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/dom_ui/shown_sections_handler.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/profile.h"
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc
index 34294d4..eb94eeb 100644
--- a/chrome/browser/dom_ui/tips_handler.cc
+++ b/chrome/browser/dom_ui/tips_handler.cc
@@ -5,6 +5,7 @@
#include <string>
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index a69703b..5696cd3 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc
index 46660cd..2443442 100644
--- a/chrome/browser/extensions/execute_code_in_tab_function.cc
+++ b/chrome/browser/extensions/execute_code_in_tab_function.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/extensions/execute_code_in_tab_function.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
diff --git a/chrome/browser/extensions/extension_accessibility_api.h b/chrome/browser/extensions/extension_accessibility_api.h
index afae039..3083b62 100644
--- a/chrome/browser/extensions/extension_accessibility_api.h
+++ b/chrome/browser/extensions/extension_accessibility_api.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/singleton.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/common/accessibility_events.h"
diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc
index 80897ad..c1808d5 100644
--- a/chrome/browser/extensions/extension_history_api.cc
+++ b/chrome/browser/extensions/extension_history_api.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/extensions/extension_history_api.h"
+#include "base/callback.h"
#include "base/json/json_writer.h"
#include "base/message_loop.h"
#include "base/string_util.h"
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 63c40a3..14ab20c 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -10,6 +10,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/base64.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/string_util.h"
#include "base/thread.h"
diff --git a/chrome/browser/extensions/file_reader.h b/chrome/browser/extensions/file_reader.h
index 7ca6309..97f6cc6 100644
--- a/chrome/browser/extensions/file_reader.h
+++ b/chrome/browser/extensions/file_reader.h
@@ -7,8 +7,8 @@
#include <string>
+#include "base/callback.h"
#include "base/ref_counted.h"
-#include "base/task.h"
#include "chrome/common/extensions/extension_resource.h"
class MessageLoop;
diff --git a/chrome/browser/extensions/file_reader_unittest.cc b/chrome/browser/extensions/file_reader_unittest.cc
index bf16b71..dbe9ceb 100644
--- a/chrome/browser/extensions/file_reader_unittest.cc
+++ b/chrome/browser/extensions/file_reader_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/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc
index e2eaa77..eaa3eb3 100644
--- a/chrome/browser/fav_icon_helper.cc
+++ b/chrome/browser/fav_icon_helper.cc
@@ -8,6 +8,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/gfx/favicon_size.h"
+#include "base/callback.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
diff --git a/chrome/browser/fav_icon_helper.h b/chrome/browser/fav_icon_helper.h
index 39c3991..e5e1b23 100644
--- a/chrome/browser/fav_icon_helper.h
+++ b/chrome/browser/fav_icon_helper.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/ref_counted_memory.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/cancelable_request.h"
diff --git a/chrome/browser/gears_integration.h b/chrome/browser/gears_integration.h
index 31d22e7..33264a7 100644
--- a/chrome/browser/gears_integration.h
+++ b/chrome/browser/gears_integration.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_GEARS_INTEGRATION_H__
#include "app/gfx/native_widget_types.h"
+#include "base/callback.h"
#include "base/string16.h"
-#include "base/task.h"
#include "chrome/common/gears_api.h"
// TODO(michaeln): Rework this interface to match how other first class
diff --git a/chrome/browser/gtk/accessibility_event_router_gtk.cc b/chrome/browser/gtk/accessibility_event_router_gtk.cc
index c020721..f912fa7 100644
--- a/chrome/browser/gtk/accessibility_event_router_gtk.cc
+++ b/chrome/browser/gtk/accessibility_event_router_gtk.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/gtk/accessibility_event_router_gtk.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/stl_util-inl.h"
#include "chrome/browser/extensions/extension_accessibility_api.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index 0a55aea..44c3d1a 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -13,6 +13,7 @@
#include "app/resource_bundle.h"
#include "app/slide_animation.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/string_util.h"
#include "base/time.h"
#include "chrome/browser/browser.h"
diff --git a/chrome/browser/gtk/list_store_favicon_loader.cc b/chrome/browser/gtk/list_store_favicon_loader.cc
index a4995db..f9a4236 100644
--- a/chrome/browser/gtk/list_store_favicon_loader.cc
+++ b/chrome/browser/gtk/list_store_favicon_loader.cc
@@ -8,6 +8,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/gfx/gtk_util.h"
+#include "base/callback.h"
#include "chrome/browser/gtk/gtk_theme_provider.h"
#include "chrome/browser/profile.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index e00da54..1396314 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/gtk/options/general_page_gtk.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/gtk/keyword_editor_view.h"
diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.h b/chrome/browser/gtk/options/url_picker_dialog_gtk.h
index ffd9b2d..7d21359 100644
--- a/chrome/browser/gtk/options/url_picker_dialog_gtk.h
+++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/task.h"
+#include "base/callback.h"
#include "chrome/browser/history/history.h"
#include "chrome/common/gtk_tree.h"
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index 6513c0c..f153455 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/callback.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/gtk/browser_window_gtk.h"
#include "chrome/browser/gtk/tabs/dragged_tab_gtk.h"
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.h b/chrome/browser/gtk/tabs/dragged_tab_gtk.h
index 4ec77bf..dd24c1b 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.h
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.h
@@ -9,6 +9,7 @@
#include "app/gfx/canvas.h"
#include "app/slide_animation.h"
+#include "base/callback.h"
#include "base/gfx/point.h"
#include "base/gfx/rect.h"
#include "base/gfx/size.h"
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index fdf7901..71d48f0 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/history/history.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/ref_counted.h"
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 33bdced..5d251c0 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
diff --git a/chrome/browser/history/history_querying_unittest.cc b/chrome/browser/history/history_querying_unittest.cc
index 3740fab..2f1d074 100644
--- a/chrome/browser/history/history_querying_unittest.cc
+++ b/chrome/browser/history/history_querying_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 9e28372..1cf7021 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -24,6 +24,7 @@
#include "app/sql/connection.h"
#include "app/sql/statement.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/icon_manager.h b/chrome/browser/icon_manager.h
index c09b94e..afb1802 100644
--- a/chrome/browser/icon_manager.h
+++ b/chrome/browser/icon_manager.h
@@ -49,6 +49,7 @@
#include <set>
#include <string>
+#include "base/callback.h"
#include "base/hash_tables.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/icon_loader.h"
diff --git a/chrome/browser/jumplist.cc b/chrome/browser/jumplist.cc
index e8d71d0..34ece2a 100644
--- a/chrome/browser/jumplist.cc
+++ b/chrome/browser/jumplist.cc
@@ -15,6 +15,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/gfx/icon_util.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
diff --git a/chrome/browser/mock_browsing_data_database_helper.cc b/chrome/browser/mock_browsing_data_database_helper.cc
index 4e708a8..54e33f4 100644
--- a/chrome/browser/mock_browsing_data_database_helper.cc
+++ b/chrome/browser/mock_browsing_data_database_helper.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/mock_browsing_data_database_helper.h"
+#include "base/callback.h"
+
MockBrowsingDataDatabaseHelper::MockBrowsingDataDatabaseHelper(
Profile* profile)
: BrowsingDataDatabaseHelper(profile),
diff --git a/chrome/browser/mock_browsing_data_database_helper.h b/chrome/browser/mock_browsing_data_database_helper.h
index ea84d51..8e075db 100644
--- a/chrome/browser/mock_browsing_data_database_helper.h
+++ b/chrome/browser/mock_browsing_data_database_helper.h
@@ -7,6 +7,8 @@
#include <map>
+#include "base/callback.h"
+
#include "chrome/browser/browsing_data_database_helper.h"
// Mock for BrowsingDataDatabaseHelper.
diff --git a/chrome/browser/mock_browsing_data_local_storage_helper.cc b/chrome/browser/mock_browsing_data_local_storage_helper.cc
index f034203..bb6c0ce 100644
--- a/chrome/browser/mock_browsing_data_local_storage_helper.cc
+++ b/chrome/browser/mock_browsing_data_local_storage_helper.cc
@@ -4,6 +4,9 @@
#include "chrome/browser/mock_browsing_data_local_storage_helper.h"
+#include "base/callback.h"
+#include "base/logging.h"
+
MockBrowsingDataLocalStorageHelper::MockBrowsingDataLocalStorageHelper(
Profile* profile)
: BrowsingDataLocalStorageHelper(profile),
diff --git a/chrome/browser/mock_browsing_data_local_storage_helper.h b/chrome/browser/mock_browsing_data_local_storage_helper.h
index 89df123..9183310 100644
--- a/chrome/browser/mock_browsing_data_local_storage_helper.h
+++ b/chrome/browser/mock_browsing_data_local_storage_helper.h
@@ -7,6 +7,8 @@
#include <map>
+#include "base/callback.h"
+
#include "chrome/browser/browsing_data_local_storage_helper.h"
// Mock for BrowsingDataLocalStorageHelper.
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc
index 44090a5..1766824 100644
--- a/chrome/browser/page_info_model.cc
+++ b/chrome/browser/page_info_model.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/page_info_model.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/i18n/time_formatting.h"
#include "chrome/browser/cert_store.h"
#include "chrome/browser/profile.h"
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index 86e1f1e..2c85a99 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
+#include "base/callback.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/profile.h"
diff --git a/chrome/browser/renderer_host/render_view_host_notification_task.h b/chrome/browser/renderer_host/render_view_host_notification_task.h
index 3093802..e5c791e 100644
--- a/chrome/browser/renderer_host/render_view_host_notification_task.h
+++ b/chrome/browser/renderer_host/render_view_host_notification_task.h
@@ -10,6 +10,7 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_NOTIFICATION_TASK_H_
+#include "base/callback.h"
#include "base/task.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/render_view_host.h"
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 71830f7..88109ae 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -6,6 +6,7 @@
#include "app/clipboard/clipboard.h"
#include "app/gfx/native_widget_types.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/histogram.h"
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 2712d48..f5068d9 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -14,6 +14,7 @@
#include "app/clipboard/clipboard.h"
#include "app/gfx/native_widget_types.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/gfx/rect.h"
#include "base/process.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index 5adc573..1fc5756 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -10,9 +10,10 @@
#include <set>
#include <vector>
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
+#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
index d818881..a0e7fcc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_database_bloom.h"
#include "base/auto_reset.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/process_util.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.h b/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
index 449e76c..d8154dc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
@@ -10,7 +10,9 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/lock.h"
+#include "base/task.h"
#include "chrome/browser/safe_browsing/safe_browsing_database.h"
namespace base {
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 1c45b84..c19e4efc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "base/callback.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_store.h b/chrome/browser/safe_browsing/safe_browsing_store.h
index 0d13e88..1d32e7d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/task.h"
#include "base/time.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
index ad494d9..0ae908f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/safe_browsing/safe_browsing_store_file.h"
+#include "base/callback.h"
+
namespace {
// NOTE(shess): kFileMagic should not be a byte-wise palindrome, so
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.h b/chrome/browser/safe_browsing/safe_browsing_store_file.h
index 25f6d9c..f7ef5de 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.h
@@ -10,6 +10,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_store.h"
+#include "base/callback.h"
#include "base/file_util.h"
// Implement SafeBrowsingStore in terms of a flat file. The file
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc
index a5e7df7..a4fba23 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_store_sqlite.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "chrome/common/sqlite_compiled_statement.h"
#include "chrome/common/sqlite_utils.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h
index 272ab56..4783c3e 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "base/callback.h"
#include "chrome/browser/safe_browsing/safe_browsing_store.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc
index 1b6f7ae..9865f5c 100644
--- a/chrome/browser/search_engines/template_url_model_unittest.cc
+++ b/chrome/browser/search_engines/template_url_model_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/callback.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/thread.h"
diff --git a/chrome/browser/search_engines/template_url_table_model.cc b/chrome/browser/search_engines/template_url_table_model.cc
index 5007758..c47ce9a 100644
--- a/chrome/browser/search_engines/template_url_table_model.cc
+++ b/chrome/browser/search_engines/template_url_table_model.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
+#include "base/callback.h"
#include "base/stl_util-inl.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/profile.h"
diff --git a/chrome/browser/sessions/base_session_service.h b/chrome/browser/sessions/base_session_service.h
index b311fd8..e6ba7d8 100644
--- a/chrome/browser/sessions/base_session_service.h
+++ b/chrome/browser/sessions/base_session_service.h
@@ -6,9 +6,9 @@
#define CHROME_BROWSER_SESSIONS_BASE_SESSION_SERVICE_H_
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/ref_counted.h"
-#include "base/task.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/sessions/session_id.h"
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 58be396..0c819ac 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 73689d4..6c5b3d9 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -8,6 +8,7 @@
#include <limits>
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/pickle.h"
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 940824e..018263e 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/defaults.h"
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 68ccc10..47fe4e1 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -8,6 +8,7 @@
#include <iterator>
#include <map>
+#include "base/callback.h"
#include "base/scoped_vector.h"
#include "base/stl_util-inl.h"
#include "chrome/browser/browser_list.h"
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/chrome/browser/sync/engine/model_changing_syncer_command.cc
index f6e9dad..2a0097d 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.cc
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/sync/engine/model_changing_syncer_command.h"
+#include "base/callback.h"
#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/sessions/sync_session.h"
#include "chrome/browser/sync/util/closure.h"
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc
index 80c909b..46969cc 100755
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_unittest.cc
@@ -12,6 +12,7 @@
#include "base/at_exit.h"
+#include "base/callback.h"
#include "base/scoped_ptr.h"
#include "build/build_config.h"
#include "chrome/browser/sync/engine/conflict_resolver.h"
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
index 4598d66..7c4f6d6 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -4,6 +4,7 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
diff --git a/chrome/browser/sync/glue/data_type_controller.h b/chrome/browser/sync/glue/data_type_controller.h
index 00dbe5b..343dee9 100644
--- a/chrome/browser/sync/glue/data_type_controller.h
+++ b/chrome/browser/sync/glue/data_type_controller.h
@@ -7,7 +7,7 @@
#include <map>
-#include "base/task.h"
+#include "base/callback.h"
#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/syncable/model_type.h"
diff --git a/chrome/browser/sync/glue/database_model_worker_unittest.cc b/chrome/browser/sync/glue/database_model_worker_unittest.cc
index 69ad5ce..48866c4 100644
--- a/chrome/browser/sync/glue/database_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/database_model_worker_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/callback.h"
#include "base/scoped_ptr.h"
#include "base/thread.h"
#include "base/timer.h"
diff --git a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
index 47f7cb6..f50487a 100644
--- a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc
@@ -4,6 +4,7 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
diff --git a/chrome/browser/sync/glue/ui_model_worker_unittest.cc b/chrome/browser/sync/glue/ui_model_worker_unittest.cc
index e90033d..bcbd87c 100644
--- a/chrome/browser/sync/glue/ui_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/ui_model_worker_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/callback.h"
#include "base/ref_counted.h"
#include "base/thread.h"
#include "chrome/browser/sync/engine/syncapi.h"
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 38ddc41..f0e663a 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc
index 3029fb5..89cdab8a 100755
--- a/chrome/browser/sync/sync_setup_flow.cc
+++ b/chrome/browser/sync/sync_setup_flow.cc
@@ -6,6 +6,7 @@
#include "app/gfx/font.h"
#include "app/gfx/font_util.h"
+#include "base/callback.h"
#include "base/histogram.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
diff --git a/chrome/browser/sync/util/closure.h b/chrome/browser/sync/util/closure.h
index b282bc4..0e4389f 100644
--- a/chrome/browser/sync/util/closure.h
+++ b/chrome/browser/sync/util/closure.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_SYNC_UTIL_CLOSURE_H_
#define CHROME_BROWSER_SYNC_UTIL_CLOSURE_H_
-#include "base/task.h"
+#include "base/callback.h"
typedef CallbackRunner<Tuple0> Closure;
diff --git a/chrome/browser/thumbnail_store.cc b/chrome/browser/thumbnail_store.cc
index d23719f..a861e4a 100644
--- a/chrome/browser/thumbnail_store.cc
+++ b/chrome/browser/thumbnail_store.cc
@@ -11,6 +11,7 @@
#include "app/sql/statement.h"
#include "app/sql/transaction.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/md5.h"
#include "base/string_util.h"
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index 544f033..ddea13a 100755
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -10,6 +10,7 @@
#include "base/i18n/word_iterator.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/file_version_info.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
diff --git a/chrome/browser/views/create_application_shortcut_view.cc b/chrome/browser/views/create_application_shortcut_view.cc
index 63d55c9..0cb2b3d 100644
--- a/chrome/browser/views/create_application_shortcut_view.cc
+++ b/chrome/browser/views/create_application_shortcut_view.cc
@@ -8,6 +8,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 00d042d..ffacde7 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -12,6 +12,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/theme_provider.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index fd3d589..7b60c24 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -8,6 +8,7 @@
#include "app/gfx/codec/png_codec.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "chrome/browser/browser.h"
diff --git a/chrome/browser/views/select_file_dialog.cc b/chrome/browser/views/select_file_dialog.cc
index 6a439f5..a12d36f 100644
--- a/chrome/browser/views/select_file_dialog.cc
+++ b/chrome/browser/views/select_file_dialog.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/shell_dialogs.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/json/json_reader.h"
#include "base/scoped_ptr.h"
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index 576815f..c8c055f 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -12,6 +12,7 @@
#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/keyboard_codes.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc
index 2f95971c..386cfef 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/views/tabs/dragged_tab_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/tabs/dragged_tab_view.h"
#include "app/gfx/canvas.h"
+#include "base/callback.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/native_view_photobooth.h"
diff --git a/chrome/browser/views/tabs/dragged_tab_view.h b/chrome/browser/views/tabs/dragged_tab_view.h
index c640df3..6ae7df7 100644
--- a/chrome/browser/views/tabs/dragged_tab_view.h
+++ b/chrome/browser/views/tabs/dragged_tab_view.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_VIEWS_TABS_DRAGGED_TAB_VIEW_H_
#include "app/slide_animation.h"
+#include "base/callback.h"
#include "base/gfx/point.h"
#include "base/gfx/size.h"
#include "base/task.h"
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index 97fcf2f..95186e9 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -8,6 +8,7 @@
#include <ShellAPI.h>
#endif // defined(OS_WIN)
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/md5.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index 56f26b6..f5d7f431 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -5,8 +5,8 @@
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_
+#include "base/callback.h"
#include "base/file_path.h"
-#include "base/task.h"
#include "chrome/browser/shell_integration.h"
#include "webkit/glue/dom_operations.h"
diff --git a/chrome/browser/worker_host/message_port_dispatcher.cc b/chrome/browser/worker_host/message_port_dispatcher.cc
index 3592012..f6e2bbf 100644
--- a/chrome/browser/worker_host/message_port_dispatcher.cc
+++ b/chrome/browser/worker_host/message_port_dispatcher.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/worker_host/message_port_dispatcher.h"
+#include "base/callback.h"
#include "base/singleton.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
diff --git a/chrome/browser/worker_host/message_port_dispatcher.h b/chrome/browser/worker_host/message_port_dispatcher.h
index c722ac2..a6cff2a 100644
--- a/chrome/browser/worker_host/message_port_dispatcher.h
+++ b/chrome/browser/worker_host/message_port_dispatcher.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/singleton.h"
#include "base/string16.h"
#include "base/task.h"
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
index f366b98..a0d75ef 100644
--- a/chrome/browser/worker_host/worker_process_host.cc
+++ b/chrome/browser/worker_host/worker_process_host.cc
@@ -7,6 +7,7 @@
#include <set>
#include <vector>
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/debug_util.h"
#include "base/message_loop.h"
diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h
index 6d1df6d..4f7ecbd 100644
--- a/chrome/browser/worker_host/worker_process_host.h
+++ b/chrome/browser/worker_host/worker_process_host.h
@@ -8,7 +8,7 @@
#include <list>
#include "base/basictypes.h"
-#include "base/task.h"
+#include "base/callback.h"
#include "chrome/browser/worker_host/worker_document_set.h"
#include "chrome/common/child_process_host.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/common/appcache/appcache_dispatcher_host.cc b/chrome/common/appcache/appcache_dispatcher_host.cc
index bfbdd89..e2f1d11 100644
--- a/chrome/common/appcache/appcache_dispatcher_host.cc
+++ b/chrome/common/appcache/appcache_dispatcher_host.cc
@@ -4,6 +4,7 @@
#include "chrome/common/appcache/appcache_dispatcher_host.h"
+#include "base/callback.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
// TODO(eroman): uh oh, depending on stuff outside of common/
#include "chrome/browser/net/chrome_url_request_context.h"
diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc
index 09f4cdb..e6f4b76 100644
--- a/chrome/plugin/command_buffer_stub.cc
+++ b/chrome/plugin/command_buffer_stub.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/callback.h"
#include "base/process_util.h"
#include "base/shared_memory.h"
#include "chrome/common/command_buffer_messages.h"
diff --git a/chrome/renderer/media/audio_renderer_impl_unittest.cc b/chrome/renderer/media/audio_renderer_impl_unittest.cc
index 5b823e8..12d0100 100644
--- a/chrome/renderer/media/audio_renderer_impl_unittest.cc
+++ b/chrome/renderer/media/audio_renderer_impl_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/callback.h"
#include "base/process_util.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/media/audio_renderer_impl.h"
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 953c734..14c57af 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -14,6 +14,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "app/resource_bundle.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/field_trial.h"
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 746f025..ae643c8 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -4,6 +4,7 @@
#include "chrome_frame/chrome_frame_automation.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
diff --git a/chrome_frame/sync_msg_reply_dispatcher.h b/chrome_frame/sync_msg_reply_dispatcher.h
index a009fb9..724c007 100644
--- a/chrome_frame/sync_msg_reply_dispatcher.h
+++ b/chrome_frame/sync_msg_reply_dispatcher.h
@@ -7,6 +7,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/lock.h"
#include "ipc/ipc_channel_proxy.h"
diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc
index 83d2b6a..f699635 100644
--- a/chrome_frame/test/automation_client_mock.cc
+++ b/chrome_frame/test/automation_client_mock.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome_frame/test/automation_client_mock.h"
+#include "base/callback.h"
#include "net/base/net_errors.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
index 7006d7f..7ababa2 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -5,6 +5,7 @@
// Tests for the Command Buffer Helper.
#include "base/at_exit.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/scoped_nsautorelease_pool.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
diff --git a/gpu/command_buffer/client/fenced_allocator_test.cc b/gpu/command_buffer/client/fenced_allocator_test.cc
index 8765635..c47f355 100644
--- a/gpu/command_buffer/client/fenced_allocator_test.cc
+++ b/gpu/command_buffer/client/fenced_allocator_test.cc
@@ -5,6 +5,7 @@
// This file contains the tests for the FencedAllocator class.
#include "base/at_exit.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/scoped_nsautorelease_pool.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
diff --git a/gpu/command_buffer/client/gles2_demo.cc b/gpu/command_buffer/client/gles2_demo.cc
index 8992c2c..41c42b1 100644
--- a/gpu/command_buffer/client/gles2_demo.cc
+++ b/gpu/command_buffer/client/gles2_demo.cc
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "base/at_exit.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
diff --git a/gpu/command_buffer/service/command_buffer_service.cc b/gpu/command_buffer/service/command_buffer_service.cc
index bd85dc1..aacfd3e 100644
--- a/gpu/command_buffer/service/command_buffer_service.cc
+++ b/gpu/command_buffer/service/command_buffer_service.cc
@@ -6,6 +6,7 @@
#include <limits>
+#include "base/callback.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
using ::base::SharedMemory;
diff --git a/gpu/command_buffer/service/command_buffer_service.h b/gpu/command_buffer/service/command_buffer_service.h
index 09050d1..ffd110f 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -8,6 +8,7 @@
#include <set>
#include <vector>
+#include "base/callback.h"
#include "base/linked_ptr.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
diff --git a/gpu/command_buffer/service/command_buffer_service_unittest.cc b/gpu/command_buffer/service/command_buffer_service_unittest.cc
index 44ea9f2..b695e2e 100644
--- a/gpu/command_buffer/service/command_buffer_service_unittest.cc
+++ b/gpu/command_buffer/service/command_buffer_service_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/callback.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/thread.h"
#include "gpu/command_buffer/common/cmd_buffer_common.h"
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 9ea66c6..58df8de 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10,6 +10,7 @@
#include <string>
#include <map>
#include <build/build_config.h> // NOLINT
+#include "base/callback.h"
#include "base/linked_ptr.h"
#include "base/scoped_ptr.h"
#define GLES2_GPU_SERVICE 1
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 913c7fb..b3e9030 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -11,7 +11,7 @@
#if defined(OS_WIN)
#include <windows.h>
#endif
-#include "base/task.h"
+#include "base/callback.h"
#include "gpu/command_buffer/service/common_decoder.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
index 27b15d1..f782be4 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
@@ -8,6 +8,7 @@
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "base/callback.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/gpu_processor.cc b/gpu/command_buffer/service/gpu_processor.cc
index 7272115..69fe8fb 100644
--- a/gpu/command_buffer/service/gpu_processor.cc
+++ b/gpu/command_buffer/service/gpu_processor.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/callback.h"
#include "base/message_loop.h"
#include "gpu/command_buffer/service/gpu_processor.h"
diff --git a/gpu/command_buffer/service/gpu_processor.h b/gpu/command_buffer/service/gpu_processor.h
index f22f249..8b8d350 100644
--- a/gpu/command_buffer/service/gpu_processor.h
+++ b/gpu/command_buffer/service/gpu_processor.h
@@ -6,10 +6,10 @@
#define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_
#include "app/gfx/native_widget_types.h"
+#include "base/callback.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
-#include "base/task.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/service/cmd_buffer_engine.h"
#include "gpu/command_buffer/service/cmd_parser.h"
diff --git a/gpu/demos/framework/window.cc b/gpu/demos/framework/window.cc
index d258792..600514f 100644
--- a/gpu/demos/framework/window.cc
+++ b/gpu/demos/framework/window.cc
@@ -4,6 +4,7 @@
#include "gpu/demos/framework/window.h"
+#include "base/callback.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/client/gles2_lib.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
diff --git a/media/base/callback.h b/media/base/callback.h
index 063bd2b..0d47e93 100644
--- a/media/base/callback.h
+++ b/media/base/callback.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
// Some basic utilities for aiding in the management of Tasks and Callbacks.
//
@@ -21,6 +21,7 @@
#include <vector>
+#include "base/callback.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
diff --git a/media/base/filters.h b/media/base/filters.h
index 0ac83bb..e5eb4cc 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -26,6 +26,7 @@
#include <limits>
#include <string>
+#include "base/callback.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index ca60179..2886f3c 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
//
// A new breed of mock media filters, this time using gmock! Feel free to add
// actions if you need interesting side-effects (i.e., copying data to the
@@ -15,6 +15,7 @@
#include <string>
+#include "base/callback.h"
#include "media/base/factory.h"
#include "media/base/filters.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/media/base/mock_reader.h b/media/base/mock_reader.h
index 3640981..775bae7 100644
--- a/media/base/mock_reader.h
+++ b/media/base/mock_reader.h
@@ -1,12 +1,13 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#ifndef MEDIA_BASE_MOCK_READER_H_
#define MEDIA_BASE_MOCK_READER_H_
#include <string>
+#include "base/callback.h"
#include "base/ref_counted.h"
#include "base/waitable_event.h"
#include "media/base/filters.h"
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index dd571c9..f474df7 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -11,7 +11,7 @@
#include <string>
-#include "base/task.h"
+#include "base/callback.h"
#include "media/base/factory.h"
namespace base {
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 2b38269..0331e5c 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -5,6 +5,7 @@
// TODO(scherkus): clean up PipelineImpl... too many crazy function names,
// potential deadlocks, etc...
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/condition_variable.h"
#include "base/stl_util-inl.h"
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index 2a2e556..7161abc 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -4,6 +4,7 @@
#include <string>
+#include "base/callback.h"
#include "base/stl_util-inl.h"
#include "base/waitable_event.h"
#include "media/base/pipeline_impl.h"
diff --git a/media/filters/audio_renderer_algorithm_base.h b/media/filters/audio_renderer_algorithm_base.h
index 6ad1c6d..b84e63c 100644
--- a/media/filters/audio_renderer_algorithm_base.h
+++ b/media/filters/audio_renderer_algorithm_base.h
@@ -25,9 +25,9 @@
#include <deque>
+#include "base/callback.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "media/base/buffer_queue.h"
namespace media {
diff --git a/media/filters/audio_renderer_algorithm_ola_unittest.cc b/media/filters/audio_renderer_algorithm_ola_unittest.cc
index f4d3504..3de796e 100644
--- a/media/filters/audio_renderer_algorithm_ola_unittest.cc
+++ b/media/filters/audio_renderer_algorithm_ola_unittest.cc
@@ -8,6 +8,7 @@
// correct rate. We always pass in a very large destination buffer with the
// expectation that FillBuffer() will fill as much as it can but no more.
+#include "base/callback.h"
#include "media/base/data_buffer.h"
#include "media/filters/audio_renderer_algorithm_ola.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
index c141803..712fc45 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/callback.h"
#include "media/base/filter_host.h"
#include "media/filters/audio_renderer_algorithm_ola.h"
diff --git a/media/filters/audio_renderer_base_unittest.cc b/media/filters/audio_renderer_base_unittest.cc
index 5aae2de..62889d0 100644
--- a/media/filters/audio_renderer_base_unittest.cc
+++ b/media/filters/audio_renderer_base_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/callback.h"
#include "base/stl_util-inl.h"
#include "media/base/data_buffer.h"
#include "media/base/mock_filter_host.h"
diff --git a/media/filters/decoder_base.h b/media/filters/decoder_base.h
index 89bab8b..5729531 100644
--- a/media/filters/decoder_base.h
+++ b/media/filters/decoder_base.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
// A base class that provides the plumbing for a decoder filters.
@@ -9,6 +9,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/lock.h"
#include "base/stl_util-inl.h"
#include "base/task.h"
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index e53efc2..6ae1cb9 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.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/callback.h"
#include "base/command_line.h"
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index b10c3ed..899af84 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -25,6 +25,7 @@
#include <deque>
#include <vector>
+#include "base/callback.h"
#include "base/waitable_event.h"
#include "media/base/buffers.h"
#include "media/base/factory.h"
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index e8f6461..2e8eab9 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -4,6 +4,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/thread.h"
#include "media/base/filters.h"
#include "media/base/mock_ffmpeg.h"
diff --git a/media/filters/file_data_source_unittest.cc b/media/filters/file_data_source_unittest.cc
index a5063c8..8089edf 100644
--- a/media/filters/file_data_source_unittest.cc
+++ b/media/filters/file_data_source_unittest.cc
@@ -5,6 +5,7 @@
#include <string>
#include "base/base_paths.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/path_service.h"
#include "base/string_util.h"
diff --git a/media/filters/omx_video_decode_engine.cc b/media/filters/omx_video_decode_engine.cc
index 034104c..bca487f 100644
--- a/media/filters/omx_video_decode_engine.cc
+++ b/media/filters/omx_video_decode_engine.cc
@@ -19,6 +19,7 @@
#include "media/filters/omx_video_decode_engine.h"
+#include "base/callback.h"
#include "base/message_loop.h"
#include "media/base/callback.h"
#include "media/ffmpeg/ffmpeg_common.h"
diff --git a/media/filters/omx_video_decode_engine.h b/media/filters/omx_video_decode_engine.h
index 4325853..43bb65d 100644
--- a/media/filters/omx_video_decode_engine.h
+++ b/media/filters/omx_video_decode_engine.h
@@ -9,6 +9,7 @@
#include <list>
#include <vector>
+#include "base/callback.h"
#include "base/lock.h"
#include "base/task.h"
#include "media/filters/video_decode_engine.h"
diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc
index d239b6f..d5a5e85 100644
--- a/media/filters/omx_video_decoder.cc
+++ b/media/filters/omx_video_decoder.cc
@@ -4,6 +4,7 @@
#include "media/filters/omx_video_decoder.h"
+#include "base/callback.h"
#include "base/waitable_event.h"
#include "media/ffmpeg/ffmpeg_common.h"
#include "media/filters/omx_video_decode_engine.h"
diff --git a/media/filters/video_decoder_impl_unittest.cc b/media/filters/video_decoder_impl_unittest.cc
index 95a4507..a1b1cf0 100644
--- a/media/filters/video_decoder_impl_unittest.cc
+++ b/media/filters/video_decoder_impl_unittest.cc
@@ -4,6 +4,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/singleton.h"
#include "base/string_util.h"
#include "media/base/data_buffer.h"
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc
index 77a736d..e8c4966 100644
--- a/media/filters/video_renderer_base.cc
+++ b/media/filters/video_renderer_base.cc
@@ -1,7 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "base/callback.h"
#include "media/base/buffers.h"
#include "media/base/filter_host.h"
#include "media/base/video_frame_impl.h"
diff --git a/media/filters/video_renderer_base_unittest.cc b/media/filters/video_renderer_base_unittest.cc
index 9735b5f..17b8b13 100644
--- a/media/filters/video_renderer_base_unittest.cc
+++ b/media/filters/video_renderer_base_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/callback.h"
#include "base/stl_util-inl.h"
#include "media/base/data_buffer.h"
#include "media/base/mock_filter_host.h"
diff --git a/media/omx/omx_codec.cc b/media/omx/omx_codec.cc
index 7699513..a86b263 100644
--- a/media/omx/omx_codec.cc
+++ b/media/omx/omx_codec.cc
@@ -1,10 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include <algorithm>
#include <string>
+#include "base/callback.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stl_util-inl.h"
diff --git a/media/omx/omx_codec.h b/media/omx/omx_codec.h
index ebc1e74..d1c3e4b 100644
--- a/media/omx/omx_codec.h
+++ b/media/omx/omx_codec.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
// TODO(ajwong): Generalize this class (fix comments, API, and extract
// implemntation) so that it can be used for encoding & decoding of both
@@ -139,8 +139,8 @@
#include <queue>
#include <vector>
+#include "base/callback.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "media/omx/omx_configurator.h"
#include "media/omx/omx_output_sink.h"
#include "third_party/openmax/il/OMX_Component.h"
diff --git a/media/omx/omx_codec_unittest.cc b/media/omx/omx_codec_unittest.cc
index 1d3df2c..525bc69 100644
--- a/media/omx/omx_codec_unittest.cc
+++ b/media/omx/omx_codec_unittest.cc
@@ -6,6 +6,7 @@
#include <deque>
+#include "base/callback.h"
#include "base/message_loop.h"
#include "media/base/mock_filters.h"
#include "media/omx/mock_omx.h"
diff --git a/media/omx/omx_output_sink.h b/media/omx/omx_output_sink.h
index 504e4b0..b4d0768 100644
--- a/media/omx/omx_output_sink.h
+++ b/media/omx/omx_output_sink.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
//
// An abstract class to define the behavior of an output buffer sink for
// media::OmxCodec. It is responsible for negotiation of buffer allocation
@@ -82,7 +82,7 @@
#include <vector>
-#include "base/task.h"
+#include "base/callback.h"
#include "third_party/openmax/il/OMX_Core.h"
// TODO(hclam): This is just to get the build going. Remove this when we
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc
index 3085181..428bacc 100644
--- a/media/tools/omx_test/omx_test.cc
+++ b/media/tools/omx_test/omx_test.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
// A test program that drives an OpenMAX video decoder module. This program
// will take video in elementary stream and read into the decoder.
@@ -9,6 +9,7 @@
// ./omx_test
#include "base/at_exit.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
diff --git a/media/tools/wav_ola_test/wav_ola_test.cc b/media/tools/wav_ola_test/wav_ola_test.cc
index c07c2d7..3c9e47f 100644
--- a/media/tools/wav_ola_test/wav_ola_test.cc
+++ b/media/tools/wav_ola_test/wav_ola_test.cc
@@ -12,6 +12,7 @@
#include <iostream>
#include <string>
+#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/ref_counted.h"
diff --git a/net/base/completion_callback.h b/net/base/completion_callback.h
index 7a5655b..11a6b3a 100644
--- a/net/base/completion_callback.h
+++ b/net/base/completion_callback.h
@@ -5,7 +5,7 @@
#ifndef NET_BASE_COMPLETION_CALLBACK_H__
#define NET_BASE_COMPLETION_CALLBACK_H__
-#include "base/task.h"
+#include "base/callback.h"
namespace net {
diff --git a/net/base/cookie_policy.h b/net/base/cookie_policy.h
index f502e64d..5e57c90 100644
--- a/net/base/cookie_policy.h
+++ b/net/base/cookie_policy.h
@@ -5,6 +5,8 @@
#ifndef NET_BASE_COOKIE_POLICY_H_
#define NET_BASE_COOKIE_POLICY_H_
+#include <string>
+
#include "net/base/completion_callback.h"
class GURL;
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index eda0927..a4c5b3c 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -1,6 +1,6 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
// For 64-bit file access (off_t = off64_t, lseek64, etc).
#define _FILE_OFFSET_BITS 64
@@ -14,6 +14,7 @@
#include <errno.h>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/eintr_wrapper.h"
#include "base/file_path.h"
#include "base/logging.h"
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index a7a650f..cf80699 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -1,7 +1,8 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "base/callback.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/platform_file.h"
diff --git a/net/base/static_cookie_policy.h b/net/base/static_cookie_policy.h
index 4734d33..d903149 100644
--- a/net/base/static_cookie_policy.h
+++ b/net/base/static_cookie_policy.h
@@ -5,6 +5,8 @@
#ifndef NET_BASE_STATIC_COOKIE_POLICY_H_
#define NET_BASE_STATIC_COOKIE_POLICY_H_
+#include <string>
+
#include "base/basictypes.h"
#include "net/base/cookie_policy.h"
diff --git a/net/base/test_completion_callback.h b/net/base/test_completion_callback.h
index 5fa14ae..1d24532 100644
--- a/net/base/test_completion_callback.h
+++ b/net/base/test_completion_callback.h
@@ -5,6 +5,7 @@
#ifndef NET_BASE_TEST_COMPLETION_CALLBACK_H_
#define NET_BASE_TEST_COMPLETION_CALLBACK_H_
+#include "base/callback.h"
#include "base/message_loop.h"
#include "net/base/completion_callback.h"
#include "net/base/net_errors.h"
diff --git a/net/disk_cache/disk_cache_test_util.h b/net/disk_cache/disk_cache_test_util.h
index 623810b..ad7db75 100644
--- a/net/disk_cache/disk_cache_test_util.h
+++ b/net/disk_cache/disk_cache_test_util.h
@@ -7,9 +7,9 @@
#include <string>
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/message_loop.h"
-#include "base/task.h"
#include "base/timer.h"
#include "build/build_config.h"
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 52b9ebfb..5ae3fd1 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -12,6 +12,7 @@
#include <unistd.h>
#endif
+#include "base/callback.h"
#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/pickle.h"
diff --git a/net/http/http_transaction.h b/net/http/http_transaction.h
index 9dfd658..2f8ddba 100644
--- a/net/http/http_transaction.h
+++ b/net/http/http_transaction.h
@@ -5,6 +5,8 @@
#ifndef NET_HTTP_HTTP_TRANSACTION_H_
#define NET_HTTP_HTTP_TRANSACTION_H_
+#include <string>
+
#include "net/base/completion_callback.h"
#include "net/base/load_states.h"
diff --git a/net/http/http_transaction_unittest.h b/net/http/http_transaction_unittest.h
index cffde7a..a884a07 100644
--- a/net/http/http_transaction_unittest.h
+++ b/net/http/http_transaction_unittest.h
@@ -10,6 +10,7 @@
#include <algorithm>
#include <string>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string_util.h"
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index ad87903..87e0250 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -4,6 +4,7 @@
#include "net/socket/client_socket_pool_base.h"
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/platform_thread.h"
@@ -1376,7 +1377,7 @@ TEST_F(ClientSocketPoolBaseTest, CleanupTimedOutIdleSockets) {
<< LoadLogUtil::PrettyPrintAsEventTree(log);
}
-// Make sure that we process all pending requests even when we're stalling
+// Make sure that we process all pending requests even when we're stalling
// because of multiple releasing disconnected sockets.
TEST_F(ClientSocketPoolBaseTest, MultipleReleasingDisconnectedSockets) {
CreatePoolWithIdleTimeouts(
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 5e1fe65..ff5384a 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/scoped_vector.h"
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index 71184bc..f592a1b 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -5,6 +5,8 @@
#ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_
#define NET_SOCKET_SSL_CLIENT_SOCKET_H_
+#include <string>
+
#include "net/socket/client_socket.h"
namespace net {
diff --git a/net/socket/tcp_client_socket_pool_unittest.cc b/net/socket/tcp_client_socket_pool_unittest.cc
index 719d280..20a42cb 100644
--- a/net/socket/tcp_client_socket_pool_unittest.cc
+++ b/net/socket/tcp_client_socket_pool_unittest.cc
@@ -4,6 +4,7 @@
#include "net/socket/tcp_client_socket_pool.h"
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "net/base/mock_host_resolver.h"
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index ae162a8..f1b5c6e 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -5,6 +5,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "net/base/load_log.h"
#include "net/base/load_log_unittest.h"
#include "net/base/mock_host_resolver.h"
diff --git a/net/websockets/websocket_unittest.cc b/net/websockets/websocket_unittest.cc
index 7ed42f9..ea3d1fe 100644
--- a/net/websockets/websocket_unittest.cc
+++ b/net/websockets/websocket_unittest.cc
@@ -5,7 +5,7 @@
#include <string>
#include <vector>
-#include "base/task.h"
+#include "base/callback.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/mock_host_resolver.h"
diff --git a/sandbox/src/crosscall_server.h b/sandbox/src/crosscall_server.h
index 4b1f309..fd0cd4c 100644
--- a/sandbox/src/crosscall_server.h
+++ b/sandbox/src/crosscall_server.h
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "sandbox/src/crosscall_params.h"
// This is the IPC server interface for CrossCall: The IPC for the Sandbox
diff --git a/sandbox/src/sandbox_policy_base.cc b/sandbox/src/sandbox_policy_base.cc
index e063603..868c841 100644
--- a/sandbox/src/sandbox_policy_base.cc
+++ b/sandbox/src/sandbox_policy_base.cc
@@ -5,6 +5,7 @@
#include "sandbox/src/sandbox_policy_base.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/logging.h"
#include "sandbox/src/filesystem_dispatcher.h"
#include "sandbox/src/filesystem_policy.h"
diff --git a/sandbox/src/sharedmem_ipc_server.cc b/sandbox/src/sharedmem_ipc_server.cc
index 8250fa8..9846b6c 100644
--- a/sandbox/src/sharedmem_ipc_server.cc
+++ b/sandbox/src/sharedmem_ipc_server.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/callback.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "sandbox/src/sharedmem_ipc_server.h"
diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc
index cba747a..ef594c8 100644
--- a/views/controls/scrollbar/bitmap_scroll_bar.cc
+++ b/views/controls/scrollbar/bitmap_scroll_bar.cc
@@ -10,6 +10,7 @@
#include "app/gfx/canvas.h"
#include "app/l10n_util.h"
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/keyboard_codes.h"
#include "base/message_loop.h"
diff --git a/views/repeat_controller.h b/views/repeat_controller.h
index 9e01dd1..78adeb1 100644
--- a/views/repeat_controller.h
+++ b/views/repeat_controller.h
@@ -5,6 +5,7 @@
#ifndef VIEWS_REPEAT_CONTROLLER_H_
#define VIEWS_REPEAT_CONTROLLER_H_
+#include "base/callback.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
diff --git a/webkit/appcache/appcache_host.h b/webkit/appcache/appcache_host.h
index fe24b9b..bb3ef49 100644
--- a/webkit/appcache/appcache_host.h
+++ b/webkit/appcache/appcache_host.h
@@ -5,9 +5,9 @@
#ifndef WEBKIT_APPCACHE_APPCACHE_HOST_H_
#define WEBKIT_APPCACHE_APPCACHE_HOST_H_
+#include "base/callback.h"
#include "base/observer_list.h"
#include "base/ref_counted.h"
-#include "base/task.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/appcache/appcache_group.h"
diff --git a/webkit/appcache/appcache_host_unittest.cc b/webkit/appcache/appcache_host_unittest.cc
index 687125b..a7f9d5d 100644
--- a/webkit/appcache/appcache_host_unittest.cc
+++ b/webkit/appcache/appcache_host_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/callback.h"
#include "base/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/appcache/appcache.h"
diff --git a/webkit/appcache/appcache_response.h b/webkit/appcache/appcache_response.h
index 68538e7..45f2251 100644
--- a/webkit/appcache/appcache_response.h
+++ b/webkit/appcache/appcache_response.h
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "base/task.h"
#include "googleurl/src/gurl.h"
#include "net/base/completion_callback.h"
#include "net/http/http_response_info.h"
diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h
index 93391e9..9677801 100644
--- a/webkit/appcache/appcache_storage_impl.h
+++ b/webkit/appcache/appcache_storage_impl.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/file_path.h"
+#include "base/task.h"
#include "net/disk_cache/disk_cache.h"
#include "webkit/appcache/appcache_database.h"
#include "webkit/appcache/appcache_storage.h"
diff --git a/webkit/glue/alt_error_page_resource_fetcher.cc b/webkit/glue/alt_error_page_resource_fetcher.cc
index 341d752..4e1867d 100644
--- a/webkit/glue/alt_error_page_resource_fetcher.cc
+++ b/webkit/glue/alt_error_page_resource_fetcher.cc
@@ -4,6 +4,7 @@
#include "webkit/glue/alt_error_page_resource_fetcher.h"
+#include "base/callback.h"
#include "webkit/glue/resource_fetcher.h"
using WebKit::WebFrame;
diff --git a/webkit/glue/alt_error_page_resource_fetcher.h b/webkit/glue/alt_error_page_resource_fetcher.h
index 363931a..86671df 100644
--- a/webkit/glue/alt_error_page_resource_fetcher.h
+++ b/webkit/glue/alt_error_page_resource_fetcher.h
@@ -5,8 +5,8 @@
#ifndef WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
#define WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H_
+#include "base/callback.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
diff --git a/webkit/glue/cpp_bound_class.h b/webkit/glue/cpp_bound_class.h
index afa4b8a..0a45c16 100644
--- a/webkit/glue/cpp_bound_class.h
+++ b/webkit/glue/cpp_bound_class.h
@@ -23,8 +23,8 @@
#include "webkit/glue/cpp_variant.h"
+#include "base/callback.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
namespace WebKit {
class WebFrame;
diff --git a/webkit/glue/image_resource_fetcher.cc b/webkit/glue/image_resource_fetcher.cc
index ad6dbdfd..ae16c03 100644
--- a/webkit/glue/image_resource_fetcher.cc
+++ b/webkit/glue/image_resource_fetcher.cc
@@ -4,6 +4,7 @@
#include "webkit/glue/image_resource_fetcher.h"
+#include "base/callback.h"
#include "base/gfx/size.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "webkit/glue/image_decoder.h"
diff --git a/webkit/glue/image_resource_fetcher.h b/webkit/glue/image_resource_fetcher.h
index 593b915..df94b54 100644
--- a/webkit/glue/image_resource_fetcher.h
+++ b/webkit/glue/image_resource_fetcher.h
@@ -6,6 +6,7 @@
#define WEBKIT_GLUE_IMAGE_RESOURCE_FETCHER_H_
#include "base/basictypes.h"
+#include "base/callback.h"
#include "webkit/glue/resource_fetcher.h"
class SkBitmap;
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index cfc2d7c..e46ed1c 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -1,7 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/process_util.h"
diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h
index 0972c2d..74813a9 100644
--- a/webkit/glue/media/buffered_data_source.h
+++ b/webkit/glue/media/buffered_data_source.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#ifndef WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
#define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/lock.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 9b6151d..f20d1c1 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "base/callback.h"
#include "base/format_macros.h"
#include "base/string_util.h"
#include "media/base/filters.h"
diff --git a/webkit/glue/media/simple_data_source_unittest.cc b/webkit/glue/media/simple_data_source_unittest.cc
index 9dc6b97..86f4439 100644
--- a/webkit/glue/media/simple_data_source_unittest.cc
+++ b/webkit/glue/media/simple_data_source_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/callback.h"
#include "media/base/filters.h"
#include "media/base/mock_filter_host.h"
#include "media/base/mock_filters.h"
diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h
index af4ec1b..75eb3ab 100644
--- a/webkit/glue/resource_fetcher.h
+++ b/webkit/glue/resource_fetcher.h
@@ -15,6 +15,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
#include "googleurl/src/gurl.h"
diff --git a/webkit/glue/resource_fetcher_unittest.cc b/webkit/glue/resource_fetcher_unittest.cc
index 5eafd6b..b68f4c6 100644
--- a/webkit/glue/resource_fetcher_unittest.cc
+++ b/webkit/glue/resource_fetcher_unittest.cc
@@ -4,6 +4,7 @@
#include "webkit/glue/resource_fetcher.h"
+#include "base/callback.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index d664f2b..da4339a 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -4,6 +4,7 @@
#include "webkit/glue/webmediaplayer_impl.h"
+#include "base/callback.h"
#include "base/command_line.h"
#include "media/base/media_format.h"
#include "media/base/media_switches.h"
diff --git a/webkit/tools/test_shell/accessibility_ui_element.cc b/webkit/tools/test_shell/accessibility_ui_element.cc
index ed23132..9ffb9d2 100644
--- a/webkit/tools/test_shell/accessibility_ui_element.cc
+++ b/webkit/tools/test_shell/accessibility_ui_element.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/logging.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index e493f87..b07313a 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -1,9 +1,10 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#include "webkit/tools/test_shell/simple_appcache_system.h"
+#include "base/callback.h"
#include "base/lock.h"
#include "base/task.h"
#include "base/waitable_event.h"