summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-08 12:30:28 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-08 12:30:28 +0000
commitd805c6a8ddfceebecf1fe9fd463fb0c8e5f3a881 (patch)
treec2f96a924fb5ddbf52276f9538f51d8cf60b42d0 /ipc/ipc_channel.h
parentaaa11b3c9bb3d4f786f41c22aeb55abdc119a5d0 (diff)
downloadchromium_src-d805c6a8ddfceebecf1fe9fd463fb0c8e5f3a881.zip
chromium_src-d805c6a8ddfceebecf1fe9fd463fb0c8e5f3a881.tar.gz
chromium_src-d805c6a8ddfceebecf1fe9fd463fb0c8e5f3a881.tar.bz2
Factor out the shared parts of IPC channel reading.
This adds a new class+file ChannelReader that is responsible for management of the common parts of IPC channel reading. The existing platform-specific ChannelImpl classes derive from this and supply platform-specific reading features via virtual classes. This is to reduce code duplication between the Windows and Posix implementations of Channel. Review URL: http://codereview.chromium.org/9547009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.h')
-rw-r--r--ipc/ipc_channel.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 983503b..63beeee 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -94,6 +94,17 @@ class IPC_EXPORT Channel : public Message::Sender {
#endif
};
+ // The Hello message is internal to the Channel class. It is sent
+ // by the peer when the channel is connected. The message contains
+ // just the process id (pid). The message has a special routing_id
+ // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE).
+ enum {
+ HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16),
+ // to avoid conflicting with normal
+ // message types, which are enumeration
+ // constants starting from 0.
+ };
+
// The maximum message size in bytes. Attempting to receive a message of this
// size or bigger results in a channel error.
static const size_t kMaximumMessageSize = 128 * 1024 * 1024;
@@ -197,17 +208,6 @@ class IPC_EXPORT Channel : public Message::Sender {
// PIMPL to which all channel calls are delegated.
class ChannelImpl;
ChannelImpl *channel_impl_;
-
- // The Hello message is internal to the Channel class. It is sent
- // by the peer when the channel is connected. The message contains
- // just the process id (pid). The message has a special routing_id
- // (MSG_ROUTING_NONE) and type (HELLO_MESSAGE_TYPE).
- enum {
- HELLO_MESSAGE_TYPE = kuint16max // Maximum value of message type (uint16),
- // to avoid conflicting with normal
- // message types, which are enumeration
- // constants starting from 0.
- };
};
} // namespace IPC