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

Side by Side Diff: chrome/common/ipc_channel_proxy.cc

Issue 155876: Revert r21117 as it caused reliability failures.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/ipc_channel_proxy.h ('k') | chrome/plugin/plugin_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/thread.h" 6 #include "base/thread.h"
7 #include "chrome/common/ipc_channel_proxy.h" 7 #include "chrome/common/ipc_channel_proxy.h"
8 #include "chrome/common/ipc_logging.h" 8 #include "chrome/common/ipc_logging.h"
9 #include "chrome/common/ipc_message_utils.h" 9 #include "chrome/common/ipc_message_utils.h"
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 filter->AddRef(); 265 filter->AddRef();
266 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 266 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
267 context_.get(), &Context::OnAddFilter, filter)); 267 context_.get(), &Context::OnAddFilter, filter));
268 } 268 }
269 269
270 void ChannelProxy::RemoveFilter(MessageFilter* filter) { 270 void ChannelProxy::RemoveFilter(MessageFilter* filter) {
271 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 271 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
272 context_.get(), &Context::OnRemoveFilter, filter)); 272 context_.get(), &Context::OnRemoveFilter, filter));
273 } 273 }
274 274
275 void ChannelProxy::ClearIPCMessageLoop() {
276 context()->ClearIPCMessageLoop();
277 }
278
279 #if defined(OS_POSIX) 275 #if defined(OS_POSIX)
280 // See the TODO regarding lazy initialization of the channel in 276 // See the TODO regarding lazy initialization of the channel in
281 // ChannelProxy::Init(). 277 // ChannelProxy::Init().
282 // We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe. 278 // We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe.
283 int ChannelProxy::GetClientFileDescriptor() const { 279 int ChannelProxy::GetClientFileDescriptor() const {
284 Channel *channel = context_.get()->channel_; 280 Channel *channel = context_.get()->channel_;
285 DCHECK(channel); // Channel must have been created first. 281 DCHECK(channel); // Channel must have been created first.
286 return channel->GetClientFileDescriptor(); 282 return channel->GetClientFileDescriptor();
287 } 283 }
288 #endif 284 #endif
289 285
290 //----------------------------------------------------------------------------- 286 //-----------------------------------------------------------------------------
291 287
292 } // namespace IPC 288 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/ipc_channel_proxy.h ('k') | chrome/plugin/plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698