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

Unified Diff: blimp/net/blimp_connection.cc

Issue 1962393004: Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Kevin's comments 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
Index: blimp/net/blimp_connection.cc
diff --git a/blimp/net/blimp_connection.cc b/blimp/net/blimp_connection.cc
index e8f3c68cc376131814ccd41bcf308c8950a2ce91..a13010ce5966eeeea782396df706e84412cd9d3e 100644
--- a/blimp/net/blimp_connection.cc
+++ b/blimp/net/blimp_connection.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <blimp/net/blimp_connection_statistics.h>
#include "blimp/net/blimp_connection.h"
#include "base/callback_helpers.h"
@@ -36,6 +37,11 @@ class BlimpMessageSender : public BlimpMessageProcessor {
void ProcessMessage(std::unique_ptr<BlimpMessage> message,
const net::CompletionCallback& callback) override;
+ void SetBlimpConnectionStatistics(BlimpConnectionStatistics* statistics) {
+ DCHECK(writer_);
+ writer_->set_blimp_connection_statistics(statistics);
+ }
+
private:
void OnWritePacketComplete(int result);
@@ -136,6 +142,18 @@ void BlimpConnection::SetIncomingMessageProcessor(
message_pump_->SetMessageProcessor(processor);
}
+void BlimpConnection::SetBlimpConnectionStatistics(
+ BlimpConnectionStatistics* statistics) {
+ if (message_pump_) {
Kevin M 2016/05/20 01:02:03 message_pump_ will always be set, ditto for the se
shaktisahu 2016/05/22 22:36:56 Done.
+ message_pump_->SetBlimpConnectionStatistics(statistics);
+ }
+ BlimpMessageSender* sender =
+ static_cast<BlimpMessageSender*>(outgoing_msg_processor_.get());
Kevin M 2016/05/20 01:02:03 Change the type of outgoing_msg_processor_ to a Bl
shaktisahu 2016/05/22 22:36:56 In that case I have to forward declare BlimpMessag
+ if (sender) {
+ sender->SetBlimpConnectionStatistics(statistics);
+ }
+}
+
BlimpMessageProcessor* BlimpConnection::GetOutgoingMessageProcessor() {
return outgoing_msg_processor_.get();
}

Powered by Google App Engine
This is Rietveld 408576698