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

Unified Diff: blimp/net/blimp_message_output_buffer.cc

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Fixed misplaced EXPORT directive Created 4 years, 12 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_unittest.cc ('k') | blimp/net/blimp_message_pump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/blimp_message_output_buffer.cc
diff --git a/blimp/net/blimp_message_output_buffer.cc b/blimp/net/blimp_message_output_buffer.cc
index 77fc3df5d409fbdd8a150cfd71fa99c7e2abdf09..d6111e4f475820719765b62a89134cbe005d8a8f 100644
--- a/blimp/net/blimp_message_output_buffer.cc
+++ b/blimp/net/blimp_message_output_buffer.cc
@@ -20,6 +20,7 @@ BlimpMessageOutputBuffer::~BlimpMessageOutputBuffer() {}
void BlimpMessageOutputBuffer::SetOutputProcessor(
BlimpMessageProcessor* processor) {
+ DVLOG(1) << "SetOutputProcessor " << processor;
// Check that we are setting or removing the processor, not replacing it.
if (processor) {
DCHECK(!output_processor_);
@@ -36,6 +37,7 @@ void BlimpMessageOutputBuffer::SetOutputProcessor(
void BlimpMessageOutputBuffer::RetransmitBufferedMessages() {
DCHECK(output_processor_);
+ DVLOG(1) << "RetransmitBufferedMessages()";
// Prepend the entirety of |ack_buffer_| to |write_buffer_|.
write_buffer_.insert(write_buffer_.begin(),
@@ -57,8 +59,7 @@ int BlimpMessageOutputBuffer::GetUnacknowledgedMessageCountForTest() const {
void BlimpMessageOutputBuffer::ProcessMessage(
scoped_ptr<BlimpMessage> message,
const net::CompletionCallback& callback) {
- VLOG(2) << "ProcessMessage (id=" << message->message_id()
- << ", type=" << message->type() << ")";
+ DVLOG(2) << "OutputBuffer::ProcessMessage " << message;
message->set_message_id(++prev_message_id_);
@@ -120,20 +121,21 @@ BlimpMessageOutputBuffer::BufferEntry::BufferEntry(
BlimpMessageOutputBuffer::BufferEntry::~BufferEntry() {}
void BlimpMessageOutputBuffer::WriteNextMessageIfReady() {
+ DVLOG(3) << "WriteNextMessageIfReady";
if (write_buffer_.empty()) {
- VLOG(2) << "Nothing to write.";
+ DVLOG(3) << "Nothing to write.";
return;
}
scoped_ptr<BlimpMessage> message_to_write(
new BlimpMessage(*write_buffer_.front()->message));
- VLOG(3) << "Writing message (id="
- << write_buffer_.front()->message->message_id()
- << ", type=" << message_to_write->type() << ")";
+ DVLOG(3) << "Writing message (id="
+ << write_buffer_.front()->message->message_id()
+ << ", type=" << message_to_write->type() << ")";
output_processor_->ProcessMessage(std::move(message_to_write),
write_complete_cb_.callback());
- VLOG(3) << "Queue size: " << write_buffer_.size();
+ DVLOG(3) << "Queue size: " << write_buffer_.size();
}
void BlimpMessageOutputBuffer::OnWriteComplete(int result) {
« no previous file with comments | « blimp/net/blimp_message_demultiplexer_unittest.cc ('k') | blimp/net/blimp_message_pump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698