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

Unified Diff: blimp/net/blimp_message_demultiplexer.cc

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/net/blimp_message_demultiplexer.h ('k') | blimp/net/blimp_message_demultiplexer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/blimp_message_demultiplexer.cc
diff --git a/blimp/net/blimp_message_demultiplexer.cc b/blimp/net/blimp_message_demultiplexer.cc
deleted file mode 100644
index b6a86ce4e6b623d087b0e566074886c3976ba6c7..0000000000000000000000000000000000000000
--- a/blimp/net/blimp_message_demultiplexer.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 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.
-
-#include "blimp/net/blimp_message_demultiplexer.h"
-
-#include <string>
-
-#include "base/strings/stringprintf.h"
-#include "blimp/common/logging.h"
-#include "blimp/net/common.h"
-#include "net/base/net_errors.h"
-
-namespace blimp {
-
-BlimpMessageDemultiplexer::BlimpMessageDemultiplexer() {}
-
-BlimpMessageDemultiplexer::~BlimpMessageDemultiplexer() {}
-
-void BlimpMessageDemultiplexer::AddProcessor(
- BlimpMessage::FeatureCase feature_case,
- BlimpMessageProcessor* receiver) {
- DCHECK(receiver);
- if (feature_receiver_map_.find(feature_case) == feature_receiver_map_.end()) {
- feature_receiver_map_.insert(std::make_pair(feature_case, receiver));
- } else {
- DLOG(FATAL) << "Handler already registered for feature=" << feature_case
- << ".";
- }
-}
-
-void BlimpMessageDemultiplexer::ProcessMessage(
- std::unique_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) {
- DVLOG(2) << "ProcessMessage : " << *message;
- auto receiver_iter = feature_receiver_map_.find(message->feature_case());
- if (receiver_iter == feature_receiver_map_.end()) {
- DLOG(ERROR) << "No registered receiver for " << *message << ".";
- if (!callback.is_null()) {
- callback.Run(net::ERR_NOT_IMPLEMENTED);
- }
- return;
- }
-
- DVLOG(2) << "Routed message " << *message << ".";
- receiver_iter->second->ProcessMessage(std::move(message), callback);
-}
-
-} // namespace blimp
« no previous file with comments | « blimp/net/blimp_message_demultiplexer.h ('k') | blimp/net/blimp_message_demultiplexer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698