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

Unified Diff: base/file_util.cc

Issue 19024: Reverting 8722,8721. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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/file_util.h ('k') | chrome/browser/browser.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.cc
===================================================================
--- base/file_util.cc (revision 8722)
+++ base/file_util.cc (working copy)
@@ -4,9 +4,6 @@
#include "base/file_util.h"
-#if defined(OS_WIN)
-#include <io.h>
-#endif
#include <stdio.h>
#include <fstream>
@@ -279,24 +276,6 @@
return fclose(file) == 0;
}
-bool TruncateFile(FILE* file) {
- if (file == NULL)
- return false;
- long current_offset = ftell(file);
- if (current_offset == -1)
- return false;
-#if defined(OS_WIN)
- int fd = _fileno(file);
- if (_chsize(fd, current_offset) != 0)
- return false;
-#else
- int fd = fileno(file);
- if (ftruncate(fd, current_offset) != 0)
- return false;
-#endif
- return true;
-}
-
bool ContainsPath(const FilePath &parent, const FilePath& child) {
FilePath abs_parent = FilePath(parent);
FilePath abs_child = FilePath(child);
« no previous file with comments | « base/file_util.h ('k') | chrome/browser/browser.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698