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

Side by Side Diff: blimp/net/blimp_message_demultiplexer.cc

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "blimp/net/blimp_message_demultiplexer.h" 5 #include "blimp/net/blimp_message_demultiplexer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 19 matching lines...) Expand all
30 } else { 30 } else {
31 DLOG(FATAL) << "Handler already registered for type=" << type << "."; 31 DLOG(FATAL) << "Handler already registered for type=" << type << ".";
32 } 32 }
33 } 33 }
34 34
35 void BlimpMessageDemultiplexer::ProcessMessage( 35 void BlimpMessageDemultiplexer::ProcessMessage(
36 scoped_ptr<BlimpMessage> message, 36 scoped_ptr<BlimpMessage> message,
37 const net::CompletionCallback& callback) { 37 const net::CompletionCallback& callback) {
38 auto receiver_iter = feature_receiver_map_.find(message->type()); 38 auto receiver_iter = feature_receiver_map_.find(message->type());
39 if (receiver_iter == feature_receiver_map_.end()) { 39 if (receiver_iter == feature_receiver_map_.end()) {
40 DLOG(FATAL) << "No registered receiver for " 40 DLOG(ERROR) << "No registered receiver for "
41 << BlimpMessageToDebugString(*message) << "."; 41 << BlimpMessageToDebugString(*message) << ".";
42 if (!callback.is_null()) { 42 if (!callback.is_null()) {
43 callback.Run(net::ERR_NOT_IMPLEMENTED); 43 callback.Run(net::ERR_NOT_IMPLEMENTED);
44 } 44 }
45 return;
45 } 46 }
46 47
47 receiver_iter->second->ProcessMessage(std::move(message), callback); 48 receiver_iter->second->ProcessMessage(std::move(message), callback);
48 } 49 }
49 50
50 } // namespace blimp 51 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698