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

Unified Diff: blimp/net/blimp_message_demultiplexer.h

Issue 1933053003: Used oneof in blimp_message.proto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 7 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 | « blimp/net/blimp_message_checkpointer_unittest.cc ('k') | blimp/net/blimp_message_demultiplexer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/blimp_message_demultiplexer.h
diff --git a/blimp/net/blimp_message_demultiplexer.h b/blimp/net/blimp_message_demultiplexer.h
index bd41338778b8b2819e4580547c967a0899a57d49..1a87ba1e16a39ca0d9cc953edcb5369b7283bf5c 100644
--- a/blimp/net/blimp_message_demultiplexer.h
+++ b/blimp/net/blimp_message_demultiplexer.h
@@ -17,7 +17,7 @@
namespace blimp {
// Multiplexing BlimpMessageProcessor which routes BlimpMessages to message
-// processors based on |message.type|.
+// processors based on the specific feature.
// BlimpMessageDemultiplexer is created on the UI thread, and then used and
// destroyed on the IO thread.
class BLIMP_NET_EXPORT BlimpMessageDemultiplexer
@@ -27,18 +27,19 @@ class BLIMP_NET_EXPORT BlimpMessageDemultiplexer
~BlimpMessageDemultiplexer() override;
// Registers a message processor which will receive all messages
- // of the |type| specified.
+ // of the |feature_case| specified.
// Only one handler may be added per type.
//
// |handler| must be valid when ProcessMessage() is called.
- void AddProcessor(BlimpMessage::Type type, BlimpMessageProcessor* handler);
+ void AddProcessor(BlimpMessage::FeatureCase feature_case,
+ BlimpMessageProcessor* handler);
// BlimpMessageProcessor implementation.
void ProcessMessage(std::unique_ptr<BlimpMessage> message,
const net::CompletionCallback& callback) override;
private:
- base::SmallMap<std::map<BlimpMessage::Type, BlimpMessageProcessor*>>
+ base::SmallMap<std::map<BlimpMessage::FeatureCase, BlimpMessageProcessor*>>
feature_receiver_map_;
DISALLOW_COPY_AND_ASSIGN(BlimpMessageDemultiplexer);
« no previous file with comments | « blimp/net/blimp_message_checkpointer_unittest.cc ('k') | blimp/net/blimp_message_demultiplexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698