Skip to content

Commit

Permalink
Add more error codes to base::CreatePlatformFile on windows.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dgrogan@chromium.org committed Apr 9, 2013
1 parent 17da26a commit 15852e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions base/platform_file_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 15852e4

Please sign in to comment.