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

Unified Diff: net/base/net_errors.h

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo Created 6 years, 8 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 2c513612209f7c2eb08dc6c249160da506664b6f..cc83c7110a0267b0f0d4684b3edea7ffa6d8b3b0 100644
--- a/net/base/net_errors.h
+++ b/net/base/net_errors.h
@@ -57,6 +57,13 @@ NET_EXPORT std::vector<int> GetAllErrorCodesForUma();
// A convenient function to translate file error to net error code.
NET_EXPORT Error FileErrorToNetError(base::File::Error file_error);
+// Return a net_error other than net::OK, based on |os_error|.
+// Some older OSs (Mac 10.6?) may fail to set the os_error properly, even when
+// a system function returns a failing value. This function is used to map such
+// cases into a default net_error, if the net_error would otherwise mistakenly
+// report OK (such as when errno was zero).
+int MapSystemErrorWithDefault(int os_error, int default_net_error);
wtc 2014/04/09 15:34:49 Nit: please list this function right below the clo
+
} // namespace net
#endif // NET_BASE_NET_ERRORS_H__
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors.cc » ('j') | net/base/net_errors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698