diff options
author | nhiroki@google.com <nhiroki@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 00:10:51 +0000 |
---|---|---|
committer | nhiroki@google.com <nhiroki@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 00:10:51 +0000 |
commit | ed2e766d1bf0f34f1dbc2ebfeccc96e57e0fdd1e (patch) | |
tree | 54a379febcb62decb7b8e50cfb422254deab2828 /net/base/net_errors.h | |
parent | a47c55de0f7160d1b3f5457dffd41ca96f8fa2f2 (diff) | |
download | chromium_src-ed2e766d1bf0f34f1dbc2ebfeccc96e57e0fdd1e.zip chromium_src-ed2e766d1bf0f34f1dbc2ebfeccc96e57e0fdd1e.tar.gz chromium_src-ed2e766d1bf0f34f1dbc2ebfeccc96e57e0fdd1e.tar.bz2 |
Factor out common error-code conversion code for PlatformFileErrorToNetError.
BUG=136494
Review URL: https://chromiumcodereview.appspot.com/10808043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_errors.h')
-rw-r--r-- | net/base/net_errors.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/base/net_errors.h b/net/base/net_errors.h index 12344e7..6c30775 100644 --- a/net/base/net_errors.h +++ b/net/base/net_errors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,6 +8,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/platform_file.h" #include "net/base/net_export.h" namespace net { @@ -50,6 +51,10 @@ NET_EXPORT Error MapSystemError(int os_error); // error code that is not followed immediately by a valid error code. std::vector<int> GetAllErrorCodesForUma(); +// A convenient function to translate platform file error to net error code. +NET_EXPORT Error PlatformFileErrorToNetError( + base::PlatformFileError file_error); + } // namespace net #endif // NET_BASE_NET_ERRORS_H__ |