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

Unified Diff: blimp/net/blimp_message_multiplexer.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_multiplexer.h ('k') | blimp/net/blimp_message_multiplexer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/blimp_message_multiplexer.cc
diff --git a/blimp/net/blimp_message_multiplexer.cc b/blimp/net/blimp_message_multiplexer.cc
deleted file mode 100644
index d3b9923d40e0d836d7900b63906803564b7b612d..0000000000000000000000000000000000000000
--- a/blimp/net/blimp_message_multiplexer.cc
+++ /dev/null
@@ -1,61 +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_multiplexer.h"
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "blimp/common/create_blimp_message.h"
-#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/net/blimp_message_processor.h"
-
-namespace blimp {
-namespace {
-
-class MultiplexedSender : public BlimpMessageProcessor {
- public:
- MultiplexedSender(base::WeakPtr<BlimpMessageProcessor> output_processor,
- BlimpMessage::FeatureCase feature_case);
- ~MultiplexedSender() override;
-
- // BlimpMessageProcessor implementation.
- // |message.feature_case|, if set, must match the sender's |feature_case_|.
- void ProcessMessage(std::unique_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) override;
-
- private:
- base::WeakPtr<BlimpMessageProcessor> output_processor_;
- BlimpMessage::FeatureCase feature_case_;
-
- DISALLOW_COPY_AND_ASSIGN(MultiplexedSender);
-};
-
-MultiplexedSender::MultiplexedSender(
- base::WeakPtr<BlimpMessageProcessor> output_processor,
- BlimpMessage::FeatureCase feature_case)
- : output_processor_(output_processor), feature_case_(feature_case) {}
-
-MultiplexedSender::~MultiplexedSender() {}
-
-void MultiplexedSender::ProcessMessage(
- std::unique_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) {
- DCHECK_EQ(feature_case_, message->feature_case());
- output_processor_->ProcessMessage(std::move(message), callback);
-}
-
-} // namespace
-
-BlimpMessageMultiplexer::BlimpMessageMultiplexer(
- BlimpMessageProcessor* output_processor)
- : output_weak_factory_(output_processor) {}
-
-BlimpMessageMultiplexer::~BlimpMessageMultiplexer() {}
-
-std::unique_ptr<BlimpMessageProcessor> BlimpMessageMultiplexer::CreateSender(
- BlimpMessage::FeatureCase feature_case) {
- return base::MakeUnique<MultiplexedSender>(output_weak_factory_.GetWeakPtr(),
- feature_case);
-}
-} // namespace blimp
« no previous file with comments | « blimp/net/blimp_message_multiplexer.h ('k') | blimp/net/blimp_message_multiplexer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698