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

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: Changed implementation to receive synchronous calls 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..2a135af64bd989698fbbe9f828298a2ac702a4da 100644
--- a/blimp/net/blimp_connection.cc
+++ b/blimp/net/blimp_connection.cc
@@ -11,6 +11,7 @@
#include "base/message_loop/message_loop.h"
#include "blimp/common/logging.h"
#include "blimp/common/proto/blimp_message.pb.h"
+#include "blimp/net/blimp_connection_statistics.h"
#include "blimp/net/blimp_message_processor.h"
#include "blimp/net/blimp_message_pump.h"
#include "blimp/net/common.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_);
Kevin M 2016/05/24 01:02:01 Not needed - the constructor guarantees that write
shaktisahu 2016/05/24 21:02:44 Removed function since we are passing in construct
+ writer_->set_blimp_connection_statistics(statistics);
+ }
+
private:
void OnWritePacketComplete(int result);
@@ -136,6 +142,14 @@ void BlimpConnection::SetIncomingMessageProcessor(
message_pump_->SetMessageProcessor(processor);
}
+void BlimpConnection::SetBlimpConnectionStatistics(
Kevin M 2016/05/24 01:02:01 We should be setting this at stream creation time,
+ BlimpConnectionStatistics* statistics) {
+ message_pump_->SetBlimpConnectionStatistics(statistics);
+ BlimpMessageSender* sender =
+ static_cast<BlimpMessageSender*>(outgoing_msg_processor_.get());
Kevin M 2016/05/24 01:02:01 See previous comment about making outgoing_msg_pro
+ sender->SetBlimpConnectionStatistics(statistics);
+}
+
BlimpMessageProcessor* BlimpConnection::GetOutgoingMessageProcessor() {
return outgoing_msg_processor_.get();
}

Powered by Google App Engine
This is Rietveld 408576698