diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-24 16:24:13 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-05-25 14:13:32 +0100 |
commit | 3f50c38dc070f4bb515c1b64450dae14f316474e (patch) | |
tree | 29f309f9534e05c47244eedb438fc612578d133b /net/base/net_log.cc | |
parent | e23bef148f7be2bdf9c3cb2cd3aa5ceebf1190fb (diff) | |
download | external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.zip external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.gz external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.bz2 |
Merge Chromium at r10.0.634.0: Initial merge by git.
Change-Id: Iac2af492818d119bcc2562eb5fdabf5ab0b6df9c
Diffstat (limited to 'net/base/net_log.cc')
-rw-r--r-- | net/base/net_log.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/base/net_log.cc b/net/base/net_log.cc index c9e7319..0f1bac4 100644 --- a/net/base/net_log.cc +++ b/net/base/net_log.cc @@ -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 @@ void BoundNetLog::EndEvent( AddEntry(event_type, NetLog::PHASE_END, params); } +void BoundNetLog::EndEventWithNetErrorCode(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, + make_scoped_refptr(new NetLogIntegerParameter("net_error", net_error))); + } +} + // static BoundNetLog BoundNetLog::Make(NetLog* net_log, NetLog::SourceType source_type) { |