diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-16 01:05:46 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-16 01:05:46 +0000 |
commit | b30a3f5c4fc1e62eaffa8db57bc5681665df3643 (patch) | |
tree | b5703b6ef2d6e879473861f0d85252f813144749 /net/socket/socket_test_util.cc | |
parent | fe62fc852bd3c1c162ee1f41992096f59387dc31 (diff) | |
download | chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.zip chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.gz chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.bz2 |
Convert LOG(INFO) to VLOG(1) - net/.
Also converts COOKIE_DLOG (since VLOG can be toggled on a granular basis), removes some unneeded "endl"s and {}s, aligns "<<"s per style guide, and changes KeygenHandler::GenKeyAndSignChallenge() to avoid using "goto".
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3846001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.cc')
-rw-r--r-- | net/socket/socket_test_util.cc | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 414d395..6f03706 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -48,54 +48,54 @@ inline char Asciify(char x) { void DumpData(const char* data, int data_len) { if (logging::LOG_INFO < logging::GetMinLogLevel()) return; - DLOG(INFO) << "Length: " << data_len; + DVLOG(1) << "Length: " << data_len; const char* pfx = "Data: "; if (!data || (data_len <= 0)) { - DLOG(INFO) << pfx << "<None>"; + DVLOG(1) << pfx << "<None>"; } else { int i; for (i = 0; i <= (data_len - 4); i += 4) { - DLOG(INFO) << pfx + DVLOG(1) << pfx + << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) + << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1]) + << AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2]) + << AsciifyHigh(data[i + 3]) << AsciifyLow(data[i + 3]) + << " '" + << Asciify(data[i + 0]) + << Asciify(data[i + 1]) + << Asciify(data[i + 2]) + << Asciify(data[i + 3]) + << "'"; + pfx = " "; + } + // Take care of any 'trailing' bytes, if data_len was not a multiple of 4. + switch (data_len - i) { + case 3: + DVLOG(1) << pfx << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1]) << AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2]) - << AsciifyHigh(data[i + 3]) << AsciifyLow(data[i + 3]) - << " '" + << " '" << Asciify(data[i + 0]) << Asciify(data[i + 1]) << Asciify(data[i + 2]) - << Asciify(data[i + 3]) - << "'"; - pfx = " "; - } - // Take care of any 'trailing' bytes, if data_len was not a multiple of 4. - switch (data_len - i) { - case 3: - DLOG(INFO) << pfx - << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) - << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1]) - << AsciifyHigh(data[i + 2]) << AsciifyLow(data[i + 2]) - << " '" - << Asciify(data[i + 0]) - << Asciify(data[i + 1]) - << Asciify(data[i + 2]) - << " '"; + << " '"; break; case 2: - DLOG(INFO) << pfx - << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) - << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1]) - << " '" - << Asciify(data[i + 0]) - << Asciify(data[i + 1]) - << " '"; + DVLOG(1) << pfx + << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) + << AsciifyHigh(data[i + 1]) << AsciifyLow(data[i + 1]) + << " '" + << Asciify(data[i + 0]) + << Asciify(data[i + 1]) + << " '"; break; case 1: - DLOG(INFO) << pfx - << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) - << " '" - << Asciify(data[i + 0]) - << " '"; + DVLOG(1) << pfx + << AsciifyHigh(data[i + 0]) << AsciifyLow(data[i + 0]) + << " '" + << Asciify(data[i + 0]) + << " '"; break; } } @@ -104,13 +104,12 @@ void DumpData(const char* data, int data_len) { void DumpMockRead(const MockRead& r) { if (logging::LOG_INFO < logging::GetMinLogLevel()) return; - DLOG(INFO) << "Async: " << r.async; - DLOG(INFO) << "Result: " << r.result; + DVLOG(1) << "Async: " << r.async + << "\nResult: " << r.result; DumpData(r.data, r.data_len); const char* stop = (r.sequence_number & MockRead::STOPLOOP) ? " (STOP)" : ""; - DLOG(INFO) << "Stage: " << (r.sequence_number & ~MockRead::STOPLOOP) - << stop; - DLOG(INFO) << "Time: " << r.time_stamp.ToInternalValue(); + DVLOG(1) << "Stage: " << (r.sequence_number & ~MockRead::STOPLOOP) << stop + << "\nTime: " << r.time_stamp.ToInternalValue(); } } // namespace |