summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-02 18:00:49 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-02 18:00:49 +0000
commit92bf906d13ba00204d3f2fc338340ccc670ed545 (patch)
tree28a8803d9a9a0810d2f9d93576d20d1cdf4d63b6 /chrome
parent68a008e82da08b0bf7d421049f0a292b99b88048 (diff)
downloadchromium_src-92bf906d13ba00204d3f2fc338340ccc670ed545.zip
chromium_src-92bf906d13ba00204d3f2fc338340ccc670ed545.tar.gz
chromium_src-92bf906d13ba00204d3f2fc338340ccc670ed545.tar.bz2
Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. This allows us to remove usage of the IOThread object, and generally makes IPC::ChannelProxy more robust for future uses.
Review URL: http://codereview.chromium.org/6901146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider.cc3
-rw-r--r--chrome/browser/service/service_process_control.cc11
-rw-r--r--chrome/renderer/devtools_agent_filter.h1
-rw-r--r--chrome/service/service_ipc_server.cc2
-rw-r--r--chrome/test/automation/automation_proxy.cc2
5 files changed, 8 insertions, 11 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 4770701..5a86ca7 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -55,7 +55,6 @@
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_toolbar_model.h"
#include "chrome/browser/extensions/user_script_master.h"
-#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/url_request_mock_util.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -166,7 +165,7 @@ bool AutomationProvider::InitializeChannel(const std::string& channel_id) {
use_named_interface ? IPC::Channel::MODE_NAMED_SERVER
: IPC::Channel::MODE_CLIENT,
this,
- g_browser_process->io_thread()->message_loop(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
true, g_browser_process->shutdown_event()));
channel_->AddFilter(automation_resource_message_filter_);
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index 6bcbabb..135d832 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -11,7 +11,6 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/io_thread.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/service_messages.h"
@@ -43,15 +42,13 @@ void ServiceProcessControl::ConnectInternal() {
// Actually going to connect.
VLOG(1) << "Connecting to Service Process IPC Server";
- // Run the IPC channel on the shared IO thread.
- base::Thread* io_thread = g_browser_process->io_thread();
// TODO(hclam): Handle error connecting to channel.
const IPC::ChannelHandle channel_id = GetServiceProcessChannel();
- channel_.reset(
- new IPC::SyncChannel(channel_id, IPC::Channel::MODE_NAMED_CLIENT, this,
- io_thread->message_loop(), true,
- g_browser_process->shutdown_event()));
+ channel_.reset(new IPC::SyncChannel(
+ channel_id, IPC::Channel::MODE_NAMED_CLIENT, this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), true,
+ g_browser_process->shutdown_event()));
}
void ServiceProcessControl::RunConnectDoneTasks() {
diff --git a/chrome/renderer/devtools_agent_filter.h b/chrome/renderer/devtools_agent_filter.h
index a02443a..efe6280 100644
--- a/chrome/renderer/devtools_agent_filter.h
+++ b/chrome/renderer/devtools_agent_filter.h
@@ -10,6 +10,7 @@
#include "ipc/ipc_channel_proxy.h"
+class MessageLoop;
struct DevToolsMessageData;
// DevToolsAgentFilter is registered as an IPC filter in order to be able to
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc
index 267a1a6..ffab169 100644
--- a/chrome/service/service_ipc_server.cc
+++ b/chrome/service/service_ipc_server.cc
@@ -27,7 +27,7 @@ void ServiceIPCServer::CreateChannel() {
channel_.reset(NULL); // Tear down the existing channel, if any.
channel_.reset(new IPC::SyncChannel(channel_handle_,
IPC::Channel::MODE_NAMED_SERVER, this,
- g_service_process->io_thread()->message_loop(), true,
+ g_service_process->io_thread()->message_loop_proxy(), true,
g_service_process->shutdown_event()));
DCHECK(sync_message_filter_.get());
channel_->AddFilter(sync_message_filter_.get());
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index f6edd40..dc00fbe 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -157,7 +157,7 @@ void AutomationProxy::InitializeChannel(const std::string& channel_id,
use_named_interface ? IPC::Channel::MODE_NAMED_CLIENT
: IPC::Channel::MODE_SERVER,
this, // we are the listener
- thread_->message_loop(),
+ thread_->message_loop_proxy(),
true,
shutdown_event_.get()));
channel_->AddFilter(new AutomationMessageFilter(this));