diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 23:14:12 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 23:14:12 +0000 |
commit | 4d45295c902a483717b1ffd9387e719691268abd (patch) | |
tree | dc1f358fb12ddfd3887f55efbbe92327b62ac11b /net/ftp/ftp_ctrl_response_buffer.cc | |
parent | b28d136bf173fdfa314071ca253c6096cf20105f (diff) | |
download | chromium_src-4d45295c902a483717b1ffd9387e719691268abd.zip chromium_src-4d45295c902a483717b1ffd9387e719691268abd.tar.gz chromium_src-4d45295c902a483717b1ffd9387e719691268abd.tar.bz2 |
Add temporary debugging code to diagnose intermittent net_unittests crashes on Mac.
I can't reproduce locally, but the code should give enough info after one crash.
TEST=none
http://crbug.com/18036
Review URL: http://codereview.chromium.org/160421
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp/ftp_ctrl_response_buffer.cc')
-rw-r--r-- | net/ftp/ftp_ctrl_response_buffer.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/ftp/ftp_ctrl_response_buffer.cc b/net/ftp/ftp_ctrl_response_buffer.cc index b60ae81..02f9908 100644 --- a/net/ftp/ftp_ctrl_response_buffer.cc +++ b/net/ftp/ftp_ctrl_response_buffer.cc @@ -8,6 +8,19 @@ #include "base/string_util.h" #include "net/base/net_errors.h" +namespace { + +// TODO(phajdan.jr): Remove when http://crbug.com/18036 is diagnosed. +void LogResponse(const net::FtpCtrlResponse& response) { + DLOG(INFO) << "received response with code " << response.status_code; + for (std::vector<std::string>::const_iterator i = response.lines.begin(); + i != response.lines.end(); ++i) { + DLOG(INFO) << "line [" << *i << "]"; + } +} + +} // namespace + namespace net { // static @@ -31,6 +44,7 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) { } else { response_buf_.status_code = line.status_code; response_buf_.lines.push_back(line.status_text); + LogResponse(response_buf_); responses_.push(response_buf_); // Prepare to handle following lines. @@ -50,6 +64,7 @@ int FtpCtrlResponseBuffer::ConsumeData(const char* data, int data_length) { if (!line.is_multiline) { response_buf_.lines.push_back(line_buf_); + LogResponse(response_buf_); responses_.push(response_buf_); // Prepare to handle following lines. |