Chromium Code Reviews| 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__ |