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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 1903663004: IPC: Fix attachment brokering race condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (scoped_ptr->std::unique_ptr) Created 4 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_channel_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_channel_proxy.h" 5 #include "ipc/ipc_channel_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 DCHECK(CalledOnValidThread()); 483 DCHECK(CalledOnValidThread());
484 484
485 context()->ClearIPCTaskRunner(); 485 context()->ClearIPCTaskRunner();
486 } 486 }
487 487
488 base::ProcessId ChannelProxy::GetPeerPID() const { 488 base::ProcessId ChannelProxy::GetPeerPID() const {
489 return context_->peer_pid_; 489 return context_->peer_pid_;
490 } 490 }
491 491
492 void ChannelProxy::OnSetAttachmentBrokerEndpoint() { 492 void ChannelProxy::OnSetAttachmentBrokerEndpoint() {
493 CHECK(!did_init_);
493 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint()); 494 context()->set_attachment_broker_endpoint(is_attachment_broker_endpoint());
494 } 495 }
495 496
496 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) 497 #if defined(OS_POSIX) && !defined(OS_NACL_SFI)
497 // See the TODO regarding lazy initialization of the channel in 498 // See the TODO regarding lazy initialization of the channel in
498 // ChannelProxy::Init(). 499 // ChannelProxy::Init().
499 int ChannelProxy::GetClientFileDescriptor() { 500 int ChannelProxy::GetClientFileDescriptor() {
500 DCHECK(CalledOnValidThread()); 501 DCHECK(CalledOnValidThread());
501 502
502 Channel* channel = context_.get()->channel_.get(); 503 Channel* channel = context_.get()->channel_.get();
(...skipping 11 matching lines...) Expand all
514 return channel->TakeClientFileDescriptor(); 515 return channel->TakeClientFileDescriptor();
515 } 516 }
516 #endif 517 #endif
517 518
518 void ChannelProxy::OnChannelInit() { 519 void ChannelProxy::OnChannelInit() {
519 } 520 }
520 521
521 //----------------------------------------------------------------------------- 522 //-----------------------------------------------------------------------------
522 523
523 } // namespace IPC 524 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698