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

Side by Side Diff: ipc/ipc_channel_reader.h

Issue 1286883003: Revert of IPC: Add attachment brokering support to the message header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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_channel_posix.cc ('k') | ipc/ipc_channel_reader.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 #ifndef IPC_IPC_CHANNEL_READER_H_ 5 #ifndef IPC_IPC_CHANNEL_READER_H_
6 #define IPC_IPC_CHANNEL_READER_H_ 6 #define IPC_IPC_CHANNEL_READER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Returns true if the given message is an Hello message 69 // Returns true if the given message is an Hello message
70 // sent on channel set-up. 70 // sent on channel set-up.
71 bool IsHelloMessage(const Message& m); 71 bool IsHelloMessage(const Message& m);
72 72
73 protected: 73 protected:
74 enum ReadState { READ_SUCCEEDED, READ_FAILED, READ_PENDING }; 74 enum ReadState { READ_SUCCEEDED, READ_FAILED, READ_PENDING };
75 75
76 Listener* listener() const { return listener_; } 76 Listener* listener() const { return listener_; }
77 77
78 // Subclasses should call this method in their destructor to give this class a
79 // chance to clean up state that might be dependent on subclass members.
80 void CleanUp();
81
82 // Populates the given buffer with data from the pipe. 78 // Populates the given buffer with data from the pipe.
83 // 79 //
84 // Returns the state of the read. On READ_SUCCESS, the number of bytes 80 // Returns the state of the read. On READ_SUCCESS, the number of bytes
85 // read will be placed into |*bytes_read| (which can be less than the 81 // read will be placed into |*bytes_read| (which can be less than the
86 // buffer size). On READ_FAILED, the channel will be closed. 82 // buffer size). On READ_FAILED, the channel will be closed.
87 // 83 //
88 // If the return value is READ_PENDING, it means that there was no data 84 // If the return value is READ_PENDING, it means that there was no data
89 // ready for reading. The implementation is then responsible for either 85 // ready for reading. The implementation is then responsible for either
90 // calling AsyncReadComplete with the number of bytes read into the 86 // calling AsyncReadComplete with the number of bytes read into the
91 // buffer, or ProcessIncomingMessages to try the read again (depending 87 // buffer, or ProcessIncomingMessages to try the read again (depending
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // set contains the AttachmentIds that are needed to unblock the message. 171 // set contains the AttachmentIds that are needed to unblock the message.
176 AttachmentIdSet blocked_ids_; 172 AttachmentIdSet blocked_ids_;
177 173
178 DISALLOW_COPY_AND_ASSIGN(ChannelReader); 174 DISALLOW_COPY_AND_ASSIGN(ChannelReader);
179 }; 175 };
180 176
181 } // namespace internal 177 } // namespace internal
182 } // namespace IPC 178 } // namespace IPC
183 179
184 #endif // IPC_IPC_CHANNEL_READER_H_ 180 #endif // IPC_IPC_CHANNEL_READER_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698