| Index: net/base/net_errors.cc
|
| diff --git a/net/base/net_errors.cc b/net/base/net_errors.cc
|
| index 623c0716bbdfcd489e757c320cd930cfbea80d5f..1d8be0e5b946d29a5b189c22dade0d8fd8481d9b 100644
|
| --- a/net/base/net_errors.cc
|
| +++ b/net/base/net_errors.cc
|
| @@ -44,4 +44,18 @@ std::vector<int> GetAllErrorCodesForUma() {
|
| kAllErrorCodes, arraysize(kAllErrorCodes));
|
| }
|
|
|
| +Error PlatformFileErrorToNetError(
|
| + base::PlatformFileError file_error) {
|
| + switch (file_error) {
|
| + case base::PLATFORM_FILE_OK:
|
| + return net::OK;
|
| + case base::PLATFORM_FILE_ERROR_NOT_FOUND:
|
| + return net::ERR_FILE_NOT_FOUND;
|
| + case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
|
| + return net::ERR_ACCESS_DENIED;
|
| + default:
|
| + return net::ERR_FAILED;
|
| + }
|
| +}
|
| +
|
| } // namespace net
|
|
|