Chromium Code Reviews| 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(); |
| } |