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

Unified Diff: chrome/common/ipc_sync_channel.cc

Issue 18324: POSIX: Get IPCSyncChannel unittests working (Closed)
Patch Set: Addressing comments Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/common.scons ('k') | chrome/common/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_sync_channel.cc
diff --git a/chrome/common/ipc_sync_channel.cc b/chrome/common/ipc_sync_channel.cc
index 4f1e71f9d99cc33f4a7e59fc8023dec19d0ff0b0..7da04bc0227688eeaf65a12ac1fb5634e2fba5ff 100644
--- a/chrome/common/ipc_sync_channel.cc
+++ b/chrome/common/ipc_sync_channel.cc
@@ -13,10 +13,6 @@
#include "chrome/common/ipc_logging.h"
#include "chrome/common/ipc_sync_message.h"
-#if !defined(OS_WIN)
-#define INFINITE -1
-#endif
-
using base::TimeDelta;
using base::TimeTicks;
using base::WaitableEvent;
@@ -375,7 +371,7 @@ SyncChannel::~SyncChannel() {
}
bool SyncChannel::Send(Message* message) {
- return SendWithTimeout(message, INFINITE);
+ return SendWithTimeout(message, base::kNoTimeout);
}
bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
@@ -391,7 +387,7 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
return false;
}
- DCHECK(sync_messages_with_no_timeout_allowed_ || timeout_ms != INFINITE);
+ DCHECK(sync_messages_with_no_timeout_allowed_ || timeout_ms != base::kNoTimeout);
jam 2009/01/17 02:12:37 80 characters
SyncMessage* sync_msg = static_cast<SyncMessage*>(message);
context->Push(sync_msg);
int message_id = SyncMessage::GetMessageId(*sync_msg);
@@ -399,7 +395,7 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
ChannelProxy::Send(message);
- if (timeout_ms != INFINITE) {
+ if (timeout_ms != base::kNoTimeout) {
// We use the sync message id so that when a message times out, we don't
// confuse it with another send that is either above/below this Send in
// the call stack.
« no previous file with comments | « chrome/common/common.scons ('k') | chrome/common/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698