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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 7870008: Wait properly for renderer crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "ipc/ipc_channel_proxy.h" 7 #include "ipc/ipc_channel_proxy.h"
8 #include "ipc/ipc_logging.h" 8 #include "ipc/ipc_logging.h"
9 #include "ipc/ipc_message_utils.h" 9 #include "ipc/ipc_message_utils.h"
10 10
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 make_scoped_refptr(filter))); 369 make_scoped_refptr(filter)));
370 } 370 }
371 371
372 void ChannelProxy::ClearIPCMessageLoop() { 372 void ChannelProxy::ClearIPCMessageLoop() {
373 context()->ClearIPCMessageLoop(); 373 context()->ClearIPCMessageLoop();
374 } 374 }
375 375
376 #if defined(OS_POSIX) && !defined(OS_NACL) 376 #if defined(OS_POSIX) && !defined(OS_NACL)
377 // See the TODO regarding lazy initialization of the channel in 377 // See the TODO regarding lazy initialization of the channel in
378 // ChannelProxy::Init(). 378 // ChannelProxy::Init().
379 // We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe. 379 int ChannelProxy::GetClientFileDescriptor() {
380 int ChannelProxy::GetClientFileDescriptor() const { 380 Channel* channel = context_.get()->channel_.get();
381 Channel *channel = context_.get()->channel_.get();
382 // Channel must have been created first. 381 // Channel must have been created first.
383 DCHECK(channel) << context_.get()->channel_id_; 382 DCHECK(channel) << context_.get()->channel_id_;
384 return channel->GetClientFileDescriptor(); 383 return channel->GetClientFileDescriptor();
385 } 384 }
386 385
386 int ChannelProxy::TakeClientFileDescriptor() {
387 Channel* channel = context_.get()->channel_.get();
388 // Channel must have been created first.
389 DCHECK(channel) << context_.get()->channel_id_;
390 return channel->TakeClientFileDescriptor();
391 }
392
387 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const { 393 bool ChannelProxy::GetClientEuid(uid_t* client_euid) const {
388 Channel *channel = context_.get()->channel_.get(); 394 Channel* channel = context_.get()->channel_.get();
389 // Channel must have been created first. 395 // Channel must have been created first.
390 DCHECK(channel) << context_.get()->channel_id_; 396 DCHECK(channel) << context_.get()->channel_id_;
391 return channel->GetClientEuid(client_euid); 397 return channel->GetClientEuid(client_euid);
392 } 398 }
393 #endif 399 #endif
394 400
395 //----------------------------------------------------------------------------- 401 //-----------------------------------------------------------------------------
396 402
397 } // namespace IPC 403 } // namespace IPC
OLDNEW
« chrome/test/automation/proxy_launcher.cc ('K') | « ipc/ipc_channel_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698