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

Unified Diff: base/file_util_win.cc

Issue 11208: Implement some missing file util functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 5562)
+++ base/file_util_win.cc (working copy)
@@ -495,10 +495,6 @@
return file;
}
-FILE* OpenFile(const std::wstring& filename, const char* mode) {
- return OpenFile(FilePath(filename), mode);
-}
-
int ReadFile(const std::wstring& filename, char* data, int size) {
ScopedHandle file(CreateFile(filename.c_str(),
GENERIC_READ,
@@ -594,9 +590,9 @@
}
// Sets the current working directory for the process.
-bool SetCurrentDirectory(const std::wstring& current_directory) {
- BOOL ret = ::SetCurrentDirectory(current_directory.c_str());
- return (ret ? true : false);
+bool SetCurrentDirectory(const FilePath& directory) {
+ BOOL ret = ::SetCurrentDirectory(directory.value().c_str());
+ return ret != 0;
}
///////////////////////////////////////////////
« no previous file with comments | « base/file_util_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698