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

Unified Diff: base/platform_file_win.cc

Issue 541022: Fix the case where the browser livelocks if we cannot open a file. (Closed)
Patch Set: Uploading checkpoint. This is known to cause all uploads on Windows to be zero bytes long. Created 10 years, 10 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') | net/base/file_stream.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 11434874e479105c98746ff14d751cd4e1d49648..ccaee1ec8157c61cacf71349677ce9cceb55984d 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -75,4 +75,12 @@ bool ClosePlatformFile(PlatformFile file) {
return (CloseHandle(file) == 0);
}
+bool GetPlatformFileSize(PlatformFile file, uint64* out_size) {
+ LARGE_INTEGER size;
+ if (!GetFileSizeEx(file, &size))
+ return false;
+ *out_size = size.QuadPart;
+ return true;
+}
+
} // namespace disk_cache
« no previous file with comments | « base/platform_file_posix.cc ('k') | net/base/file_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698