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

Side by Side Diff: ipc/ipc_sync_channel.cc

Issue 6880166: Improving logging in /app, /base, /crypto and /ipc. Updating plain DCHECK() usages for DCHECK_EQ/LE/ (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Static casting to DWORD to fix type mismatch Created 9 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 | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_sync_message_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) 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 "ipc/ipc_sync_channel.h" 5 #include "ipc/ipc_sync_channel.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 iter->done_event->Signal(); 354 iter->done_event->Signal();
355 } 355 }
356 356
357 void SyncChannel::SyncContext::OnWaitableEventSignaled(WaitableEvent* event) { 357 void SyncChannel::SyncContext::OnWaitableEventSignaled(WaitableEvent* event) {
358 if (event == shutdown_event_) { 358 if (event == shutdown_event_) {
359 // Process shut down before we can get a reply to a synchronous message. 359 // Process shut down before we can get a reply to a synchronous message.
360 // Cancel pending Send calls, which will end up setting the send done event. 360 // Cancel pending Send calls, which will end up setting the send done event.
361 CancelPendingSends(); 361 CancelPendingSends();
362 } else { 362 } else {
363 // We got the reply, timed out or the process shutdown. 363 // We got the reply, timed out or the process shutdown.
364 DCHECK(event == GetSendDoneEvent()); 364 DCHECK_EQ(GetSendDoneEvent(), event);
365 MessageLoop::current()->QuitNow(); 365 MessageLoop::current()->QuitNow();
366 } 366 }
367 } 367 }
368 368
369 369
370 SyncChannel::SyncChannel( 370 SyncChannel::SyncChannel(
371 const IPC::ChannelHandle& channel_handle, 371 const IPC::ChannelHandle& channel_handle,
372 Channel::Mode mode, 372 Channel::Mode mode,
373 Channel::Listener* listener, 373 Channel::Listener* listener,
374 MessageLoop* ipc_message_loop, 374 MessageLoop* ipc_message_loop,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { 503 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) {
504 DCHECK(event == sync_context()->GetDispatchEvent()); 504 DCHECK(event == sync_context()->GetDispatchEvent());
505 // The call to DispatchMessages might delete this object, so reregister 505 // The call to DispatchMessages might delete this object, so reregister
506 // the object watcher first. 506 // the object watcher first.
507 event->Reset(); 507 event->Reset();
508 dispatch_watcher_.StartWatching(event, this); 508 dispatch_watcher_.StartWatching(event, this);
509 sync_context()->DispatchMessages(); 509 sync_context()->DispatchMessages();
510 } 510 }
511 511
512 } // namespace IPC 512 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_sync_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698