Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: content/common/child_thread.cc

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/child_process.cc ('k') | content/common/fileapi/webblobregistry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_thread.cc
diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc
index efb5e7120e3f89e5093d36adc81be14ca0daa766..b301ab750a3784f4e3fa329cebcf4755ea3b2d20 100644
--- a/content/common/child_thread.cc
+++ b/content/common/child_thread.cc
@@ -96,11 +96,14 @@ ChildThread::ChildThread(const std::string& channel_name)
void ChildThread::Init() {
on_channel_error_called_ = false;
- message_loop_ = MessageLoop::current();
- channel_.reset(new IPC::SyncChannel(channel_name_,
- IPC::Channel::MODE_CLIENT, this,
- ChildProcess::current()->io_message_loop_proxy(), true,
- ChildProcess::current()->GetShutDownEvent()));
+ message_loop_ = base::MessageLoop::current();
+ channel_.reset(
+ new IPC::SyncChannel(channel_name_,
+ IPC::Channel::MODE_CLIENT,
+ this,
+ ChildProcess::current()->io_message_loop_proxy(),
+ true,
+ ChildProcess::current()->GetShutDownEvent()));
#ifdef IPC_MESSAGE_LOG_ENABLED
IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
@@ -129,7 +132,7 @@ void ChildThread::Init() {
channel_->AddFilter(new SuicideOnChannelErrorFilter());
#endif
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ChildThread::EnsureConnected,
channel_connected_factory_.GetWeakPtr()),
@@ -161,11 +164,11 @@ void ChildThread::OnChannelConnected(int32 peer_pid) {
void ChildThread::OnChannelError() {
set_on_channel_error_called(true);
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
bool ChildThread::Send(IPC::Message* msg) {
- DCHECK(MessageLoop::current() == message_loop());
+ DCHECK(base::MessageLoop::current() == message_loop());
if (!channel_) {
delete msg;
return false;
@@ -175,13 +178,13 @@ bool ChildThread::Send(IPC::Message* msg) {
}
void ChildThread::AddRoute(int32 routing_id, IPC::Listener* listener) {
- DCHECK(MessageLoop::current() == message_loop());
+ DCHECK(base::MessageLoop::current() == message_loop());
router_.AddRoute(routing_id, listener);
}
void ChildThread::RemoveRoute(int32 routing_id) {
- DCHECK(MessageLoop::current() == message_loop());
+ DCHECK(base::MessageLoop::current() == message_loop());
router_.RemoveRoute(routing_id);
}
@@ -273,7 +276,7 @@ bool ChildThread::OnControlMessageReceived(const IPC::Message& msg) {
}
void ChildThread::OnShutdown() {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
}
#if defined(IPC_MESSAGE_LOG_ENABLED)
@@ -333,7 +336,7 @@ bool ChildThread::IsWebFrameValid(WebKit::WebFrame* frame) {
void ChildThread::OnProcessFinalRelease() {
if (on_channel_error_called_) {
- MessageLoop::current()->Quit();
+ base::MessageLoop::current()->Quit();
return;
}
« no previous file with comments | « content/common/child_process.cc ('k') | content/common/fileapi/webblobregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698