diff options
author | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 20:38:20 +0000 |
---|---|---|
committer | ahendrickson@chromium.org <ahendrickson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-23 20:38:20 +0000 |
commit | 210564f22a7eeacb57b9fe62f254cda5c2e6722b (patch) | |
tree | b62db0d21d520d79a9d5f45c900a6c44337b4757 /net/base/net_errors_posix.cc | |
parent | 71751eb28961e96a0cbf4d91f02610329f1c87ce (diff) | |
download | chromium_src-210564f22a7eeacb57b9fe62f254cda5c2e6722b.zip chromium_src-210564f22a7eeacb57b9fe62f254cda5c2e6722b.tar.gz chromium_src-210564f22a7eeacb57b9fe62f254cda5c2e6722b.tar.bz2 |
Record UMA statistics for file_stream operations.
Allows control over whether or not to record the statistics based on flags.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7583049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_errors_posix.cc')
-rw-r--r-- | net/base/net_errors_posix.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/base/net_errors_posix.cc b/net/base/net_errors_posix.cc index 143912c..0d8b7de 100644 --- a/net/base/net_errors_posix.cc +++ b/net/base/net_errors_posix.cc @@ -5,12 +5,19 @@ #include "net/base/net_errors.h" #include <errno.h> +#include <stdlib.h> +#include <string> +#include <unistd.h> #include "base/logging.h" +#include "base/stringprintf.h" namespace net { Error MapSystemError(int os_error) { + if (os_error != 0) + DVLOG(2) << "Error " << os_error; + // There are numerous posix error codes, but these are the ones we thus far // find interesting. switch (os_error) { @@ -98,6 +105,8 @@ Error MapSystemError(int os_error) { return ERR_ACCESS_DENIED; case EUSERS: // Too many users. return ERR_INSUFFICIENT_RESOURCES; + case EMFILE: // Too many open files. + return ERR_INSUFFICIENT_RESOURCES; case 0: return OK; |