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

Side by Side Diff: ipc/ipc_sync_channel.cc

Issue 1185133006: IPC: Make ChannelReader inherit from SupportsAttachmentBrokering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from tsepez. Created 5 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_channel_unittest.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_sync_channel.h" 5 #include "ipc/ipc_sync_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 return base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this); 405 return base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this);
406 } 406 }
407 407
408 // static 408 // static
409 scoped_ptr<SyncChannel> SyncChannel::Create( 409 scoped_ptr<SyncChannel> SyncChannel::Create(
410 const IPC::ChannelHandle& channel_handle, 410 const IPC::ChannelHandle& channel_handle,
411 Channel::Mode mode, 411 Channel::Mode mode,
412 Listener* listener, 412 Listener* listener,
413 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, 413 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
414 bool create_pipe_now, 414 bool create_pipe_now,
415 base::WaitableEvent* shutdown_event) { 415 base::WaitableEvent* shutdown_event,
416 AttachmentBroker* broker) {
416 scoped_ptr<SyncChannel> channel = 417 scoped_ptr<SyncChannel> channel =
417 Create(listener, ipc_task_runner, shutdown_event); 418 Create(listener, ipc_task_runner, shutdown_event);
418 channel->Init(channel_handle, mode, create_pipe_now); 419 channel->Init(channel_handle, mode, create_pipe_now, broker);
419 return channel.Pass(); 420 return channel.Pass();
420 } 421 }
421 422
422 // static 423 // static
423 scoped_ptr<SyncChannel> SyncChannel::Create( 424 scoped_ptr<SyncChannel> SyncChannel::Create(
424 scoped_ptr<ChannelFactory> factory, 425 scoped_ptr<ChannelFactory> factory,
425 Listener* listener, 426 Listener* listener,
426 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, 427 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
427 bool create_pipe_now, 428 bool create_pipe_now,
428 base::WaitableEvent* shutdown_event) { 429 base::WaitableEvent* shutdown_event) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 // manual reset since the object watcher might otherwise reset the event 578 // manual reset since the object watcher might otherwise reset the event
578 // when we're doing a WaitMany. 579 // when we're doing a WaitMany.
579 dispatch_watcher_callback_ = 580 dispatch_watcher_callback_ =
580 base::Bind(&SyncChannel::OnWaitableEventSignaled, 581 base::Bind(&SyncChannel::OnWaitableEventSignaled,
581 base::Unretained(this)); 582 base::Unretained(this));
582 dispatch_watcher_.StartWatching(sync_context()->GetDispatchEvent(), 583 dispatch_watcher_.StartWatching(sync_context()->GetDispatchEvent(),
583 dispatch_watcher_callback_); 584 dispatch_watcher_callback_);
584 } 585 }
585 586
586 } // namespace IPC 587 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698