From 392264c76c724e3c31273ad1aa932a041cc12a7e Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Tue, 11 Nov 2008 00:01:38 +0000 Subject: Added CreateTemporaryFileName that takes a FilePath argument. Review URL: http://codereview.chromium.org/9752 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5142 0039d316-1c4b-4281-b951-d872f2087c98 --- base/file_util_win.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'base/file_util_win.cc') diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 6e6f6b0..355bdfd 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -393,13 +393,18 @@ bool GetTempDir(FilePath* path) { 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, -- cgit v1.1