Chromium Code Reviews| Index: net/base/net_errors.h |
| diff --git a/net/base/net_errors.h b/net/base/net_errors.h |
| index 6c30775eb376afb7638914efbb39e886ca5ff2ff..a0162d10643a47cb8223c4f6ec96022aa04441cd 100644 |
| --- a/net/base/net_errors.h |
| +++ b/net/base/net_errors.h |
| @@ -39,6 +39,15 @@ inline bool IsCertificateError(int error) { |
| return error <= ERR_CERT_BEGIN && error > ERR_CERT_END; |
| } |
| +// Returns true if |error| is a success error code. |
|
darin (slow to review)
2012/08/10 18:03:02
I'm not sure we want to add these. You'll need fe
mkosiba (inactive)
2012/08/29 15:53:01
I'll pull it out for now. Should I be concerned ab
|
| +inline bool IsSuccess(int error) { |
| + return error >= OK; |
| +} |
| + |
| +inline bool IsSuccessOrPending(int error) { |
| + return IsSuccess(error) || error == ERR_IO_PENDING; |
| +} |
| + |
| // Map system error code to Error. |
| NET_EXPORT Error MapSystemError(int os_error); |