Chromium Code Reviews| Index: net/base/net_log.cc |
| =================================================================== |
| --- net/base/net_log.cc (revision 68857) |
| +++ net/base/net_log.cc (working copy) |
| @@ -3,11 +3,13 @@ |
| // found in the LICENSE file. |
| #include "net/base/net_log.h" |
| + |
| #include "base/logging.h" |
| #include "base/string_number_conversions.h" |
| #include "base/time.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/values.h" |
| +#include "net/base/net_errors.h" |
| namespace net { |
| @@ -157,6 +159,18 @@ |
| AddEntry(event_type, NetLog::PHASE_END, params); |
| } |
| +void BoundNetLog::EndEventWithErrorCode(NetLog::EventType event_type, |
| + int net_error) const { |
| + DCHECK_NE(net_error, net::ERR_IO_PENDING); |
| + if (net_error >= 0) { |
| + EndEvent(event_type, NULL); |
| + } else { |
| + EndEvent( |
| + event_type, |
|
eroman
2011/01/05 02:39:06
nit: I believe this continuation should be indente
mmenke
2011/01/05 16:32:25
Done. The line breaking rules now haunt my dreams
|
| + make_scoped_refptr(new NetLogIntegerParameter("net_error", net_error))); |
| + } |
| +} |
| + |
| // static |
| BoundNetLog BoundNetLog::Make(NetLog* net_log, |
| NetLog::SourceType source_type) { |