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

Unified Diff: base/file_util_posix.cc

Issue 194021: Bug fix: produce unique temp file names when the VFS requests a handle to a n... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Final version. Created 11 years, 3 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 | « no previous file | chrome/browser/renderer_host/database_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_posix.cc
===================================================================
--- base/file_util_posix.cc (revision 25936)
+++ base/file_util_posix.cc (working copy)
@@ -426,11 +426,10 @@
return fdopen(fd, "a+");
}
-// TODO(port): implement me.
-bool CreateTemporaryFileInDir(const FilePath& dir,
- FilePath* temp_file) {
- NOTREACHED();
- return false;
+
+bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file) {
+ int fd = CreateAndOpenFdForTemporaryFile(dir, temp_file);
+ return ((fd >= 0) && !close(fd));
}
bool CreateNewTempDirectory(const FilePath::StringType& prefix,
« no previous file with comments | « no previous file | chrome/browser/renderer_host/database_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698