Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2694)

Unified Diff: base/platform_file_win.cc

Issue 12095045: Merge 175642 (also includes 175980) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/platform_file_posix.cc ('k') | chrome/test/base/v8_unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_win.cc
===================================================================
--- base/platform_file_win.cc (revision 179457)
+++ base/platform_file_win.cc (working copy)
@@ -9,11 +9,10 @@
#include "base/threading/thread_restrictions.h"
namespace base {
-
-PlatformFile CreatePlatformFile(const FilePath& name,
- int flags,
- bool* created,
- PlatformFileError* error_code) {
+PlatformFile CreatePlatformFileUnsafe(const FilePath& name,
+ int flags,
+ bool* created,
+ PlatformFileError* error) {
base::ThreadRestrictions::AssertIOAllowed();
DWORD disposition = 0;
@@ -83,26 +82,26 @@
*created = true;
}
- if (error_code) {
+ if (error) {
if (file != kInvalidPlatformFileValue)
- *error_code = PLATFORM_FILE_OK;
+ *error = PLATFORM_FILE_OK;
else {
DWORD last_error = GetLastError();
switch (last_error) {
case ERROR_SHARING_VIOLATION:
- *error_code = PLATFORM_FILE_ERROR_IN_USE;
+ *error = PLATFORM_FILE_ERROR_IN_USE;
break;
case ERROR_FILE_EXISTS:
- *error_code = PLATFORM_FILE_ERROR_EXISTS;
+ *error = PLATFORM_FILE_ERROR_EXISTS;
break;
case ERROR_FILE_NOT_FOUND:
- *error_code = PLATFORM_FILE_ERROR_NOT_FOUND;
+ *error = PLATFORM_FILE_ERROR_NOT_FOUND;
break;
case ERROR_ACCESS_DENIED:
- *error_code = PLATFORM_FILE_ERROR_ACCESS_DENIED;
+ *error = PLATFORM_FILE_ERROR_ACCESS_DENIED;
break;
default:
- *error_code = PLATFORM_FILE_ERROR_FAILED;
+ *error = PLATFORM_FILE_ERROR_FAILED;
}
}
}
« no previous file with comments | « base/platform_file_posix.cc ('k') | chrome/test/base/v8_unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698