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

Unified Diff: base/platform_file_win.cc

Issue 10392181: Implement serial API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: From -> At. Created 8 years, 7 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/browser/extensions/api/api_resource_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_win.cc
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 0b689621df4b03bd93fa9c20488a62c73245fd0a..ab2716317cbb425a63f4ab2d3d1874f5377893ea 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -134,8 +134,12 @@ int ReadPlatformFile(PlatformFile file, int64 offset, char* data, int size) {
return -1;
}
-int ReadPlatformFileNoBestEffort(PlatformFile file, int64 offset,
- char* data, int size) {
+int ReadPlatformFileAtCurrentPos(PlatformFile file, char* data, int size) {
+ return ReadPlatformFile(file, 0, data, size);
+}
+
+int ReadPlatformFileNoBestEffort(PlatformFile file, int64 offset, char* data,
+ int size) {
return ReadPlatformFile(file, offset, data, size);
}
@@ -159,6 +163,11 @@ int WritePlatformFile(PlatformFile file, int64 offset,
return -1;
}
+int WritePlatformFileAtCurrentPos(PlatformFile file, const char* data,
+ int size) {
+ return WritePlatformFile(file, 0, data, size);
+}
+
bool TruncatePlatformFile(PlatformFile file, int64 length) {
base::ThreadRestrictions::AssertIOAllowed();
if (file == kInvalidPlatformFileValue)
« no previous file with comments | « base/platform_file_posix.cc ('k') | chrome/browser/extensions/api/api_resource_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698