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

Unified Diff: net/quic/core/spdy_utils.cc

Issue 2629723003: Revert of Add quic_logging (Closed)
Patch Set: Created 3 years, 11 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 | « net/quic/core/quic_versions.cc ('k') | net/quic/platform/api/quic_logging.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/spdy_utils.cc
diff --git a/net/quic/core/spdy_utils.cc b/net/quic/core/spdy_utils.cc
index 11ca27585b59272bdefc6da58a67ede5de27762d..c2f4fd2d07a38fbbac2379450661990ddf38fa3a 100644
--- a/net/quic/core/spdy_utils.cc
+++ b/net/quic/core/spdy_utils.cc
@@ -8,7 +8,6 @@
#include <vector>
#include "base/stl_util.h"
-#include "net/quic/platform/api/quic_logging.h"
#include "net/quic/platform/api/quic_text_utils.h"
#include "net/spdy/spdy_flags.h"
#include "net/spdy/spdy_frame_builder.h"
@@ -64,8 +63,7 @@
for (const StringPiece& value : values) {
int64_t new_value;
if (!base::StringToInt64(value, &new_value) || new_value < 0) {
- QUIC_DLOG(ERROR)
- << "Content length was either unparseable or negative.";
+ DLOG(ERROR) << "Content length was either unparseable or negative.";
return false;
}
if (*content_length < 0) {
@@ -73,10 +71,9 @@
continue;
}
if (new_value != *content_length) {
- QUIC_DLOG(ERROR)
- << "Parsed content length " << new_value << " is "
- << "inconsistent with previously detected content length "
- << *content_length;
+ DLOG(ERROR) << "Parsed content length " << new_value << " is "
+ << "inconsistent with previously detected content length "
+ << *content_length;
return false;
}
}
@@ -92,7 +89,7 @@
SpdyFramer framer(SpdyFramer::ENABLE_COMPRESSION);
if (!framer.ParseHeaderBlockInBuffer(data, data_len, trailers) ||
trailers->empty()) {
- QUIC_DVLOG(1) << "Request Trailers are invalid.";
+ DVLOG(1) << "Request Trailers are invalid.";
return false; // Trailers were invalid.
}
@@ -101,8 +98,7 @@
auto it = trailers->find(kFinalOffsetHeaderKey);
if (it == trailers->end() ||
!base::StringToSizeT(it->second, final_byte_offset)) {
- QUIC_DVLOG(1) << "Required key '" << kFinalOffsetHeaderKey
- << "' not present";
+ DVLOG(1) << "Required key '" << kFinalOffsetHeaderKey << "' not present";
return false;
}
// The final offset header is no longer needed.
@@ -113,15 +109,15 @@
StringPiece key = trailer.first;
StringPiece value = trailer.second;
if (QuicTextUtils::StartsWith(key, ":")) {
- QUIC_DVLOG(1) << "Trailers must not contain pseudo-header: '" << key
- << "','" << value << "'.";
+ DVLOG(1) << "Trailers must not contain pseudo-header: '" << key << "','"
+ << value << "'.";
return false;
}
// TODO(rjshade): Check for other forbidden keys, following the HTTP/2 spec.
}
- QUIC_DVLOG(1) << "Successfully parsed Trailers.";
+ DVLOG(1) << "Successfully parsed Trailers.";
return true;
}
@@ -131,13 +127,13 @@
for (const auto& p : header_list) {
const string& name = p.first;
if (name.empty()) {
- QUIC_DVLOG(1) << "Header name must not be empty.";
+ DVLOG(1) << "Header name must not be empty.";
return false;
}
if (QuicTextUtils::ContainsUpperCase(name)) {
- QUIC_DLOG(ERROR) << "Malformed header: Header name " << name
- << " contains upper-case characters.";
+ DVLOG(1) << "Malformed header: Header name " << name
+ << " contains upper-case characters.";
return false;
}
@@ -149,7 +145,7 @@
return false;
}
- QUIC_DVLOG(1) << "Successfully parsed headers: " << headers->DebugString();
+ DVLOG(1) << "Successfully parsed headers: " << headers->DebugString();
return true;
}
@@ -171,20 +167,19 @@
}
if (name.empty() || name[0] == ':') {
- QUIC_DVLOG(1)
- << "Trailers must not be empty, and must not contain pseudo-"
- << "headers. Found: '" << name << "'";
+ DVLOG(1) << "Trailers must not be empty, and must not contain pseudo-"
+ << "headers. Found: '" << name << "'";
return false;
}
if (QuicTextUtils::ContainsUpperCase(name)) {
- QUIC_DLOG(INFO) << "Malformed header: Header name " << name
- << " contains upper-case characters.";
+ DVLOG(1) << "Malformed header: Header name " << name
+ << " contains upper-case characters.";
return false;
}
if (trailers->find(name) != trailers->end()) {
- QUIC_DLOG(INFO) << "Duplicate header '" << name << "' found in trailers.";
+ DVLOG(1) << "Duplicate header '" << name << "' found in trailers.";
return false;
}
@@ -192,14 +187,13 @@
}
if (!found_final_byte_offset) {
- QUIC_DVLOG(1) << "Required key '" << kFinalOffsetHeaderKey
- << "' not present";
+ DVLOG(1) << "Required key '" << kFinalOffsetHeaderKey << "' not present";
return false;
}
// TODO(rjshade): Check for other forbidden keys, following the HTTP/2 spec.
- QUIC_DVLOG(1) << "Successfully parsed Trailers: " << trailers->DebugString();
+ DVLOG(1) << "Successfully parsed Trailers: " << trailers->DebugString();
return true;
}
« no previous file with comments | « net/quic/core/quic_versions.cc ('k') | net/quic/platform/api/quic_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698