Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: net/base/net_errors.h

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed some minor issues Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/net_errors.h
diff --git a/net/base/net_errors.h b/net/base/net_errors.h
index 761c2d2af41a7257ab8d83be628fe8806ef2655b..8347fcf85a82a6b3efe0f2d3241fa7bd16811195 100644
--- a/net/base/net_errors.h
+++ b/net/base/net_errors.h
@@ -20,6 +20,7 @@ NET_EXPORT extern const char kErrorDomain[];
enum Error {
// No error.
OK = 0,
+ OK_HANDLED_EXTERNALLY = 1,
#define NET_ERROR(label, value) ERR_ ## label = value,
#include "net/base/net_error_list.h"
@@ -39,6 +40,15 @@ inline bool IsCertificateError(int error) {
return error <= ERR_CERT_BEGIN && error > ERR_CERT_END;
}
+// Returns true if |error| is a success error code.
+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);

Powered by Google App Engine
This is Rietveld 408576698