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

Unified Diff: blimp/net/blimp_message_pump.h

Issue 1452823011: Make PacketReader/PacketWriter interfaces async-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rehabbed tests, addressed feedback, made changes to BlimpMessagePump Created 5 years 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
Index: blimp/net/blimp_message_pump.h
diff --git a/blimp/net/blimp_message_pump.h b/blimp/net/blimp_message_pump.h
index e8fc0aade5c19e2ecba00f2a55e3bae87d72c5ab..03d2469fdd6f5201f4baf28a358fa10cff576109 100644
--- a/blimp/net/blimp_message_pump.h
+++ b/blimp/net/blimp_message_pump.h
@@ -26,13 +26,12 @@ class PacketReader;
// message, the BlimpMessagePump reads the next packet.
class BLIMP_NET_EXPORT BlimpMessagePump {
public:
- // Caller ensures |reader| outlive this object.
+ // Caller ensures that |reader| outlives this object.
explicit BlimpMessagePump(PacketReader* reader);
~BlimpMessagePump();
- // Sets the processor which will take blimp messages.
- // Can be set multiple times, but previously set processors are discarded.
+ // Sets the processor which will take BlimpMessages. Can only be set once.
// Caller retains the ownership of |processor|.
void SetMessageProcessor(BlimpMessageProcessor* processor);
@@ -47,15 +46,15 @@ class BLIMP_NET_EXPORT BlimpMessagePump {
// Callback when next packet is ready in |buffer_|.
void OnReadPacketComplete(int result);
- // Callback when |processor_| finishes processing a blimp message.
+ // Callback when |processor_| finishes processing a BlimpMessage.
void OnProcessMessageComplete(int result);
PacketReader* reader_;
ConnectionErrorObserver* error_observer_;
BlimpMessageProcessor* processor_;
scoped_refptr<net::GrowableIOBuffer> buffer_;
- net::CancelableCompletionCallback read_packet_callback_;
net::CancelableCompletionCallback process_msg_callback_;
Wez 2015/12/01 22:34:45 nit: It would be helpful to have a one-line commen
Kevin M 2015/12/02 02:02:37 Done.
+ net::CancelableCompletionCallback read_callback_;
Wez 2015/12/01 22:34:45 Again, it'd be good to explain why we need a cance
Kevin M 2015/12/02 02:02:37 Done.
DISALLOW_COPY_AND_ASSIGN(BlimpMessagePump);
};

Powered by Google App Engine
This is Rietveld 408576698