summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:43:01 +0000
committerahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 23:43:01 +0000
commit25edef40e0b04e7537d6a876eeba312c3d1ebb78 (patch)
treeb32f39b39d0c3e4a0dda46da7437a0bfbc789f90 /net
parent321f4c12b428e24d6a59817e80aa36707aecd72f (diff)
downloadchromium_src-25edef40e0b04e7537d6a876eeba312c3d1ebb78.zip
chromium_src-25edef40e0b04e7537d6a876eeba312c3d1ebb78.tar.gz
chromium_src-25edef40e0b04e7537d6a876eeba312c3d1ebb78.tar.bz2
Reducing the debug output spam.
BUG=None TEST=None Review URL: http://codereview.chromium.org/1321002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42694 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_network_transaction.cc2
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc42
-rw-r--r--net/spdy/spdy_session.cc4
-rw-r--r--net/spdy/spdy_stream.cc8
4 files changed, 22 insertions, 34 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 2f06113..218f26d 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -489,7 +489,6 @@ void HttpNetworkTransaction::DoCallback(int rv) {
}
void HttpNetworkTransaction::OnIOComplete(int result) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
int rv = DoLoop(result);
if (rv != ERR_IO_PENDING)
DoCallback(rv);
@@ -500,7 +499,6 @@ int HttpNetworkTransaction::DoLoop(int result) {
int rv = result;
do {
- DLOG(INFO) << " * " << __FUNCTION__ << "() state = " << next_state_;
State state = next_state_;
next_state_ = STATE_NONE;
switch (state) {
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 412b34e..12eaadc 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -22,6 +22,8 @@
#include "net/spdy/spdy_protocol.h"
#include "testing/platform_test.h"
+#define NET_TRACE(level, s) DLOG(level) << s << __FUNCTION__ << "() "
+
//-----------------------------------------------------------------------------
namespace net {
@@ -691,21 +693,21 @@ class OrderedSocketData : public StaticSocketDataProvider,
EndLoop();
if ((next_read.sequence_number & ~MockRead::STOPLOOP) <=
sequence_number_++) {
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ - 1 << ": Read " << read_index();
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ - 1
+ << ": Read " << read_index();
DumpMockRead(next_read);
return StaticSocketDataProvider::GetNextRead();
}
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ - 1 << ": I/O Pending";
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ - 1
+ << ": I/O Pending";
MockRead result = MockRead(true, ERR_IO_PENDING);
DumpMockRead(result);
return result;
}
virtual MockWriteResult OnWrite(const std::string& data) {
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ << ": Write " << write_index();
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_
+ << ": Write " << write_index();
DumpMockRead(PeekWrite());
++sequence_number_;
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -714,7 +716,7 @@ class OrderedSocketData : public StaticSocketDataProvider,
}
virtual void Reset() {
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
+ NET_TRACE(INFO, " *** ") << "Stage "
<< sequence_number_ << ": Reset()";
sequence_number_ = 0;
loop_stop_stage_ = 0;
@@ -731,22 +733,21 @@ class OrderedSocketData : public StaticSocketDataProvider,
void EndLoop() {
// If we've already stopped the loop, don't do it again until we've advanced
// to the next sequence_number.
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ << ": EndLoop()";
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_ << ": EndLoop()";
if (loop_stop_stage_ > 0) {
const MockRead& next_read = StaticSocketDataProvider::PeekRead();
if ((next_read.sequence_number & ~MockRead::STOPLOOP) >
loop_stop_stage_) {
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ << ": Clearing stop index";
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_
+ << ": Clearing stop index";
loop_stop_stage_ = 0;
} else {
return;
}
}
// Record the sequence_number at which we stopped the loop.
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_ << ": Posting Quit at read " << read_index();
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_
+ << ": Posting Quit at read " << read_index();
loop_stop_stage_ = sequence_number_;
if (callback_)
callback_->RunWithParams(Tuple1<int>(ERR_IO_PENDING));
@@ -754,8 +755,7 @@ class OrderedSocketData : public StaticSocketDataProvider,
void CompleteRead() {
if (socket()) {
- DLOG(INFO) << " *** " << __FUNCTION__ << "() Stage "
- << sequence_number_;
+ NET_TRACE(INFO, " *** ") << "Stage " << sequence_number_;
socket()->OnReadComplete(GetNextRead());
}
}
@@ -1634,7 +1634,11 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) {
arraysize(kPushBodyFrame3) - 1, 8),
MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 6
arraysize(kPushBodyFrame4) - 1, 9),
- MockRead(true, ERR_IO_PENDING, MockRead::STOPLOOP | 10) // 7
+ MockRead(true, ERR_IO_PENDING, MockRead::STOPLOOP | 10), // 7
+ MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 8
+ arraysize(kPushBodyFrame4) - 1, 11),
+ MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 9
+ arraysize(kPushBodyFrame4) - 1, 12)
};
// We disable SSL for this test.
@@ -1707,10 +1711,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) {
2,
&response2);
- if (test_type != PUSH_DURING_REQUEST) {
- // Complete the next read now and teardown.
- data->CompleteRead();
- }
+ // Complete the next read now and teardown.
+ data->CompleteRead();
// Verify that we consumed all test data.
EXPECT_TRUE(data->at_read_eof());
EXPECT_TRUE(data->at_write_eof());
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 4c684cd..882da55 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -533,7 +533,6 @@ void SpdySession::OnSSLConnect(int result) {
}
void SpdySession::OnReadComplete(int bytes_read) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
// Parse a frame. For now this code requires that the frame fit into our
// buffer (32KB).
// TODO(mbelshe): support arbitrarily large frames!
@@ -572,7 +571,6 @@ void SpdySession::OnReadComplete(int bytes_read) {
}
void SpdySession::OnWriteComplete(int result) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
DCHECK(write_pending_);
DCHECK(in_flight_write_.size());
DCHECK(result != 0); // This shouldn't happen for write.
@@ -1023,7 +1021,6 @@ void SpdySession::OnSynReply(const spdy::SpdySynReplyControlFrame& frame,
}
void SpdySession::OnControl(const spdy::SpdyControlFrame* frame) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
spdy::SpdyHeaderBlock headers;
uint32 type = frame->type();
if (type == spdy::SYN_STREAM || type == spdy::SYN_REPLY) {
@@ -1081,7 +1078,6 @@ void SpdySession::OnFin(const spdy::SpdyRstStreamControlFrame& frame) {
}
void SpdySession::OnGoAway(const spdy::SpdyGoAwayControlFrame& frame) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
session_->spdy_session_pool()->Remove(this);
// TODO(willchan): Cancel any streams that are past the GoAway frame's
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index c381da1..5382f6c 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -151,8 +151,6 @@ int SpdyStream::SendRequest(UploadDataStream* upload_data,
CHECK(!cancelled_);
CHECK(response);
- DLOG(INFO) << " * " << __FUNCTION__ << "()";
-
if (response_) {
*response = *response_;
delete response_;
@@ -194,7 +192,6 @@ void SpdyStream::Cancel() {
}
void SpdyStream::OnResponseReceived(const HttpResponseInfo& response) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
metrics_.StartStream();
CHECK(!response_->headers);
@@ -226,7 +223,6 @@ void SpdyStream::OnResponseReceived(const HttpResponseInfo& response) {
}
bool SpdyStream::OnDataReceived(const char* data, int length) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
DCHECK_GE(length, 0);
LOG(INFO) << "SpdyStream: Data (" << length << " bytes) received for "
<< stream_id_;
@@ -277,7 +273,6 @@ bool SpdyStream::OnDataReceived(const char* data, int length) {
}
void SpdyStream::OnWriteComplete(int status) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
// TODO(mbelshe): Check for cancellation here. If we're cancelled, we
// should discontinue the DoLoop.
@@ -288,7 +283,6 @@ void SpdyStream::OnWriteComplete(int status) {
}
void SpdyStream::OnClose(int status) {
- DLOG(INFO) << " >> " << __FUNCTION__ << "()";
response_complete_ = true;
response_status_ = status;
stream_id_ = 0;
@@ -301,8 +295,6 @@ void SpdyStream::OnClose(int status) {
int SpdyStream::DoLoop(int result) {
do {
- DLOG(INFO) << " * " << __FUNCTION__ << "() state = " << io_state_
- << " result = " << result;
State state = io_state_;
io_state_ = STATE_NONE;
switch (state) {