diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-15 03:56:59 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-15 03:56:59 +0000 |
commit | 16710dda742b65e2b5d78169d1b5beac6ed3c6be (patch) | |
tree | ca2ef00186f4add6df988cadaa2d192faafbf3ef | |
parent | 9f59d0d1c5147cab3e25b0cf97350e36a08df21f (diff) | |
download | chromium_src-16710dda742b65e2b5d78169d1b5beac6ed3c6be.zip chromium_src-16710dda742b65e2b5d78169d1b5beac6ed3c6be.tar.gz chromium_src-16710dda742b65e2b5d78169d1b5beac6ed3c6be.tar.bz2 |
Cleanup: Remove unneeded browser_thread.h includes in content/.
Fix lint errors too.
Review URL: https://codereview.chromium.org/166243002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251505 0039d316-1c4b-4281-b951-d872f2087c98
11 files changed, 30 insertions, 35 deletions
diff --git a/content/browser/accessibility/accessibility_ui.cc b/content/browser/accessibility/accessibility_ui.cc index a5ec30b..6aefa99 100644 --- a/content/browser/accessibility/accessibility_ui.cc +++ b/content/browser/accessibility/accessibility_ui.cc @@ -16,7 +16,6 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/view_message_enums.h" #include "content/port/browser/render_widget_host_view_port.h" -#include "content/public/browser/browser_thread.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_process_host.h" @@ -171,11 +170,10 @@ void AccessibilityUI::ToggleAccessibility(const base::ListValue* args) { std::string route_id_str; int process_id; int route_id; - CHECK(args->GetSize() == 2); + CHECK_EQ(2U, args->GetSize()); CHECK(args->GetString(0, &process_id_str)); CHECK(args->GetString(1, &route_id_str)); - CHECK(base::StringToInt(process_id_str, - &process_id)); + CHECK(base::StringToInt(process_id_str, &process_id)); CHECK(base::StringToInt(route_id_str, &route_id)); RenderViewHost* rvh = RenderViewHost::FromID(process_id, route_id); @@ -206,7 +204,7 @@ void AccessibilityUI::RequestAccessibilityTree(const base::ListValue* args) { std::string route_id_str; int process_id; int route_id; - CHECK(args->GetSize() == 2); + CHECK_EQ(2U, args->GetSize()); CHECK(args->GetString(0, &process_id_str)); CHECK(args->GetString(1, &route_id_str)); CHECK(base::StringToInt(process_id_str, &process_id)); diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc index ca2ccf9..d1ebfff 100644 --- a/content/browser/gpu/gpu_ipc_browsertests.cc +++ b/content/browser/gpu/gpu_ipc_browsertests.cc @@ -9,7 +9,6 @@ #include "content/common/gpu/client/context_provider_command_buffer.h" #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" #include "content/common/gpu/gpu_process_launch_causes.h" -#include "content/public/browser/browser_thread.h" #include "content/public/browser/gpu_data_manager.h" #include "content/public/common/content_switches.h" #include "content/test/content_browser_test.h" @@ -20,6 +19,10 @@ namespace { using content::WebGraphicsContext3DCommandBufferImpl; +const content::CauseForGpuLaunch kInitCause = + content:: + CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; + class ContextTestBase : public content::ContentBrowserTest { public: virtual void SetUpOnMainThread() OVERRIDE { @@ -33,9 +36,7 @@ class ContextTestBase : public content::ContentBrowserTest { content::BrowserGpuChannelHostFactory::instance(); CHECK(factory); scoped_refptr<content::GpuChannelHost> gpu_channel_host( - factory->EstablishGpuChannelSync( - content:: - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); + factory->EstablishGpuChannelSync(kInitCause)); context_.reset( WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( gpu_channel_host.get(), @@ -55,7 +56,7 @@ class ContextTestBase : public content::ContentBrowserTest { } protected: - scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; + scoped_ptr<content::WebGraphicsContext3DCommandBufferImpl> context_; gpu::ContextSupport* context_support_; }; @@ -70,13 +71,13 @@ namespace content { class BrowserGpuChannelHostFactoryTest : public ContextTestBase { public: virtual void SetUpOnMainThread() OVERRIDE { - if (!content::BrowserGpuChannelHostFactory::CanUseForTesting()) + if (!BrowserGpuChannelHostFactory::CanUseForTesting()) return; // Start all tests without a gpu channel so that the tests exercise a // consistent codepath. - if (!content::BrowserGpuChannelHostFactory::instance()) - content::BrowserGpuChannelHostFactory::Initialize(false); + if (!BrowserGpuChannelHostFactory::instance()) + BrowserGpuChannelHostFactory::Initialize(false); CHECK(GetFactory()); @@ -109,9 +110,7 @@ class BrowserGpuChannelHostFactoryTest : public ContextTestBase { void EstablishAndWait() { base::RunLoop run_loop; - GetFactory()->EstablishGpuChannel( - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, - run_loop.QuitClosure()); + GetFactory()->EstablishGpuChannel(kInitCause, run_loop.QuitClosure()); run_loop.Run(); } @@ -150,9 +149,7 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, DCHECK(!IsChannelEstablished()); base::RunLoop run_loop; - GetFactory()->EstablishGpuChannel( - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, - run_loop.QuitClosure()); + GetFactory()->EstablishGpuChannel(kInitCause, run_loop.QuitClosure()); GetFactory()->Terminate(); // The callback should still trigger. @@ -165,13 +162,12 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, AlreadyEstablished) { DCHECK(!IsChannelEstablished()); scoped_refptr<GpuChannelHost> gpu_channel = - GetFactory()->EstablishGpuChannelSync( - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE); + GetFactory()->EstablishGpuChannelSync(kInitCause); // Expect established callback immediately. bool event = false; GetFactory()->EstablishGpuChannel( - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE, + kInitCause, base::Bind(&BrowserGpuChannelHostFactoryTest::Signal, &event)); EXPECT_TRUE(event); EXPECT_EQ(gpu_channel, GetGpuChannel()); diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc index 6e85c42..cdbaca5 100644 --- a/content/browser/indexed_db/indexed_db_database.cc +++ b/content/browser/indexed_db/indexed_db_database.cc @@ -21,7 +21,6 @@ #include "content/browser/indexed_db/indexed_db_transaction.h" #include "content/common/indexed_db/indexed_db_key_path.h" #include "content/common/indexed_db/indexed_db_key_range.h" -#include "content/public/browser/browser_thread.h" #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" using base::ASCIIToUTF16; @@ -700,6 +699,7 @@ struct IndexedDBDatabase::PutOperationParams { scoped_refptr<IndexedDBCallbacks> callbacks; std::vector<IndexKeys> index_keys; + private: DISALLOW_COPY_AND_ASSIGN(PutOperationParams); }; @@ -963,6 +963,7 @@ struct IndexedDBDatabase::OpenCursorOperationParams { IndexedDBDatabase::TaskType task_type; scoped_refptr<IndexedDBCallbacks> callbacks; + private: DISALLOW_COPY_AND_ASSIGN(OpenCursorOperationParams); }; diff --git a/content/browser/power_monitor_message_broadcaster.h b/content/browser/power_monitor_message_broadcaster.h index 04af601..082ba67 100644 --- a/content/browser/power_monitor_message_broadcaster.h +++ b/content/browser/power_monitor_message_broadcaster.h @@ -6,13 +6,11 @@ #define CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_ #include "base/basictypes.h" -#include "base/memory/ref_counted.h" #include "base/power_monitor/power_observer.h" #include "content/common/content_export.h" -#include "content/public/browser/browser_thread.h" namespace IPC { - class Sender; +class Sender; } namespace content { @@ -36,6 +34,6 @@ class CONTENT_EXPORT PowerMonitorMessageBroadcaster DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster); }; -} // namespace base +} // namespace content #endif // CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_ diff --git a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc index 79c312d..d457929 100644 --- a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc +++ b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc @@ -13,7 +13,6 @@ #include "content/browser/fileapi/browser_file_system_helper.h" #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h" #include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/storage_partition.h" #include "net/base/escape.h" diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 2a926bc..ff3ed04 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -37,7 +37,6 @@ #include "content/common/view_messages.h" #include "content/port/browser/render_widget_host_view_frame_subscriber.h" #include "content/port/browser/render_widget_host_view_port.h" -#include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" @@ -369,8 +368,8 @@ void AcknowledgeBufferForGpu( // We need to watch for mouse events outside a Web Popup or its parent // and dismiss the popup for certain events. -class RenderWidgetHostViewAura::EventFilterForPopupExit : - public ui::EventHandler { +class RenderWidgetHostViewAura::EventFilterForPopupExit + : public ui::EventHandler { public: explicit EventFilterForPopupExit(RenderWidgetHostViewAura* rwhva) : rwhva_(rwhva) { diff --git a/content/browser/streams/stream_context.cc b/content/browser/streams/stream_context.cc index 44ca0f4..357e68c 100644 --- a/content/browser/streams/stream_context.cc +++ b/content/browser/streams/stream_context.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "content/browser/streams/stream_registry.h" #include "content/public/browser/browser_context.h" +#include "content/public/browser/browser_thread.h" using base::UserDataAdapter; diff --git a/content/browser/streams/stream_context.h b/content/browser/streams/stream_context.h index fb6cdc7..ad8f65c 100644 --- a/content/browser/streams/stream_context.h +++ b/content/browser/streams/stream_context.h @@ -9,7 +9,6 @@ #include "base/memory/scoped_ptr.h" #include "base/sequenced_task_runner_helpers.h" #include "content/common/content_export.h" -#include "content/public/browser/browser_thread.h" namespace content { class BrowserContext; diff --git a/content/browser/streams/stream_handle_impl.cc b/content/browser/streams/stream_handle_impl.cc index d9f877c..e7ab8ea 100644 --- a/content/browser/streams/stream_handle_impl.cc +++ b/content/browser/streams/stream_handle_impl.cc @@ -4,8 +4,10 @@ #include "content/browser/streams/stream_handle_impl.h" +#include "base/bind.h" +#include "base/location.h" +#include "base/message_loop/message_loop_proxy.h" #include "content/browser/streams/stream.h" -#include "content/public/browser/browser_thread.h" namespace content { diff --git a/content/browser/streams/stream_handle_impl.h b/content/browser/streams/stream_handle_impl.h index aabd0cb..1d3614d 100644 --- a/content/browser/streams/stream_handle_impl.h +++ b/content/browser/streams/stream_handle_impl.h @@ -6,10 +6,13 @@ #define CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ #include "base/memory/weak_ptr.h" -#include "base/message_loop/message_loop_proxy.h" #include "base/synchronization/lock.h" #include "content/public/browser/stream_handle.h" +namespace base { +class MessageLoopProxy; +} + namespace content { class Stream; diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc index d7834b0..92a2f31 100644 --- a/content/browser/web_contents/web_contents_impl_unittest.cc +++ b/content/browser/web_contents/web_contents_impl_unittest.cc @@ -24,7 +24,6 @@ #include "content/public/common/url_constants.h" #include "content/public/common/url_utils.h" #include "content/public/test/mock_render_process_host.h" -#include "content/public/test/test_browser_thread.h" #include "content/public/test/test_utils.h" #include "content/test/test_content_browser_client.h" #include "content/test/test_content_client.h" |