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

Unified Diff: base/file_util_win.cc

Issue 9752: Added CreateTemporaryFileName that takes a FilePath argument. (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
« base/file_util.cc ('K') | « base/file_util_unittest.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 5112)
+++ base/file_util_win.cc (working copy)
@@ -393,13 +393,18 @@
return true;
}
-bool CreateTemporaryFileName(std::wstring* temp_file) {
- std::wstring temp_path;
+bool CreateTemporaryFileName(FilePath* path) {
+ std::wstring temp_path, temp_file;
if (!GetTempDir(&temp_path))
return false;
- return CreateTemporaryFileNameInDir(temp_path, temp_file);
+ if (CreateTemporaryFileNameInDir(temp_path, &temp_file)) {
+ *path = FilePath(temp_file);
+ return true;
+ }
+
+ return false;
}
bool CreateTemporaryFileNameInDir(const std::wstring& dir,
« base/file_util.cc ('K') | « base/file_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698