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

Unified Diff: components/nacl/renderer/pnacl_translation_resource_host.cc

Issue 324143002: Decouple IPC::MessageFilter from IPC::Channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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
Index: components/nacl/renderer/pnacl_translation_resource_host.cc
diff --git a/components/nacl/renderer/pnacl_translation_resource_host.cc b/components/nacl/renderer/pnacl_translation_resource_host.cc
index 087c8048ebbe170bef60396eeb51c684d27cb83f..5ac1e8a63c9c72b3ad48daa5dbfaebebe206ddf1 100644
--- a/components/nacl/renderer/pnacl_translation_resource_host.cc
+++ b/components/nacl/renderer/pnacl_translation_resource_host.cc
@@ -21,26 +21,26 @@ PnaclTranslationResourceHost::CacheRequestInfo::~CacheRequestInfo() {}
PnaclTranslationResourceHost::PnaclTranslationResourceHost(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
- : io_message_loop_(io_message_loop), channel_(NULL) {}
+ : io_message_loop_(io_message_loop), sender_(NULL) {}
PnaclTranslationResourceHost::~PnaclTranslationResourceHost() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
CleanupCacheRequests();
}
-void PnaclTranslationResourceHost::OnFilterAdded(IPC::Channel* channel) {
+void PnaclTranslationResourceHost::OnFilterAdded(IPC::Sender* sender) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = channel;
+ sender_ = sender;
}
void PnaclTranslationResourceHost::OnFilterRemoved() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
+ sender_ = NULL;
}
void PnaclTranslationResourceHost::OnChannelClosing() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
+ sender_ = NULL;
}
bool PnaclTranslationResourceHost::OnMessageReceived(
@@ -84,8 +84,8 @@ void PnaclTranslationResourceHost::SendRequestNexeFd(
PP_FileHandle* file_handle,
scoped_refptr<TrackedCallback> callback) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (!channel_ || !channel_->Send(new NaClHostMsg_NexeTempFileRequest(
- render_view_id, instance, cache_info))) {
+ if (!sender_ || !sender_->Send(new NaClHostMsg_NexeTempFileRequest(
+ render_view_id, instance, cache_info))) {
PpapiGlobals::Get()->GetMainThreadMessageLoop()
->PostTask(FROM_HERE,
base::Bind(&TrackedCallback::Run,
@@ -115,13 +115,13 @@ void PnaclTranslationResourceHost::SendReportTranslationFinished(
PP_Instance instance,
PP_Bool success) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- // If the channel is closed or we have been detached, we are probably shutting
+ // If the sender is closed or we have been detached, we are probably shutting
// down, so just don't send anything.
- if (!channel_)
+ if (!sender_)
return;
DCHECK(pending_cache_requests_.count(instance) == 0);
- channel_->Send(new NaClHostMsg_ReportTranslationFinished(instance,
- PP_ToBool(success)));
+ sender_->Send(new NaClHostMsg_ReportTranslationFinished(instance,
+ PP_ToBool(success)));
}
void PnaclTranslationResourceHost::OnNexeTempFileReply(
« no previous file with comments | « components/nacl/renderer/pnacl_translation_resource_host.h ('k') | components/tracing/child_trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698