summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 21:20:42 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 21:20:42 +0000
commit15852e44383b5def72173d7a00930027cca583bd (patch)
tree2cb9a5ab2b58d0313e4e8ee736584145a0944934 /base
parent17da26a8e321b3ea620e8818394cd4c9935379bd (diff)
downloadchromium_src-15852e44383b5def72173d7a00930027cca583bd.zip
chromium_src-15852e44383b5def72173d7a00930027cca583bd.tar.gz
chromium_src-15852e44383b5def72173d7a00930027cca583bd.tar.bz2
Add more error codes to base::CreatePlatformFile on windows.
I don't know exactly which errors CreateFile will return. The ones in this CL were culled from http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx BUG=229252 Review URL: https://chromiumcodereview.appspot.com/13872003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/platform_file_win.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 82185cfe..a7d3902 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -104,6 +104,18 @@ PlatformFile CreatePlatformFileUnsafe(const FilePath& name,
case ERROR_ACCESS_DENIED:
*error = PLATFORM_FILE_ERROR_ACCESS_DENIED;
break;
+ case ERROR_TOO_MANY_OPEN_FILES:
+ *error = PLATFORM_FILE_ERROR_TOO_MANY_OPENED;
+ break;
+ case ERROR_OUTOFMEMORY:
+ case ERROR_NOT_ENOUGH_MEMORY:
+ *error = PLATFORM_FILE_ERROR_NO_MEMORY;
+ break;
+ case ERROR_HANDLE_DISK_FULL:
+ case ERROR_DISK_FULL:
+ case ERROR_DISK_RESOURCES_EXHAUSTED:
+ *error = PLATFORM_FILE_ERROR_NO_SPACE;
+ break;
default:
*error = PLATFORM_FILE_ERROR_FAILED;
}