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

Side by Side Diff: ipc/ipc_sync_channel.cc

Issue 507773002: Remove implicit conversions from scoped_refptr to T* in ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo.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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 new SyncChannel(listener, ipc_task_runner, shutdown_event)); 441 new SyncChannel(listener, ipc_task_runner, shutdown_event));
442 } 442 }
443 443
444 SyncChannel::SyncChannel( 444 SyncChannel::SyncChannel(
445 Listener* listener, 445 Listener* listener,
446 base::SingleThreadTaskRunner* ipc_task_runner, 446 base::SingleThreadTaskRunner* ipc_task_runner,
447 WaitableEvent* shutdown_event) 447 WaitableEvent* shutdown_event)
448 : ChannelProxy(new SyncContext(listener, ipc_task_runner, shutdown_event)) { 448 : ChannelProxy(new SyncContext(listener, ipc_task_runner, shutdown_event)) {
449 // The current (listener) thread must be distinct from the IPC thread, or else 449 // The current (listener) thread must be distinct from the IPC thread, or else
450 // sending synchronous messages will deadlock. 450 // sending synchronous messages will deadlock.
451 DCHECK_NE(ipc_task_runner, base::ThreadTaskRunnerHandle::Get()); 451 DCHECK_NE(ipc_task_runner, base::ThreadTaskRunnerHandle::Get().get());
452 StartWatching(); 452 StartWatching();
453 } 453 }
454 454
455 SyncChannel::~SyncChannel() { 455 SyncChannel::~SyncChannel() {
456 } 456 }
457 457
458 void SyncChannel::SetRestrictDispatchChannelGroup(int group) { 458 void SyncChannel::SetRestrictDispatchChannelGroup(int group) {
459 sync_context()->set_restrict_dispatch_group(group); 459 sync_context()->set_restrict_dispatch_group(group);
460 } 460 }
461 461
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 // manual reset since the object watcher might otherwise reset the event 578 // manual reset since the object watcher might otherwise reset the event
579 // when we're doing a WaitMany. 579 // when we're doing a WaitMany.
580 dispatch_watcher_callback_ = 580 dispatch_watcher_callback_ =
581 base::Bind(&SyncChannel::OnWaitableEventSignaled, 581 base::Bind(&SyncChannel::OnWaitableEventSignaled,
582 base::Unretained(this)); 582 base::Unretained(this));
583 dispatch_watcher_.StartWatching(sync_context()->GetDispatchEvent(), 583 dispatch_watcher_.StartWatching(sync_context()->GetDispatchEvent(),
584 dispatch_watcher_callback_); 584 dispatch_watcher_callback_);
585 } 585 }
586 586
587 } // namespace IPC 587 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698