diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 00:01:38 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 00:01:38 +0000 |
commit | 392264c76c724e3c31273ad1aa932a041cc12a7e (patch) | |
tree | fca9dca526bda74fa05a791b179e35e86e5c9755 /base/file_util_win.cc | |
parent | 27961c57893201b2914f173cb517e33f37d0ae58 (diff) | |
download | chromium_src-392264c76c724e3c31273ad1aa932a041cc12a7e.zip chromium_src-392264c76c724e3c31273ad1aa932a041cc12a7e.tar.gz chromium_src-392264c76c724e3c31273ad1aa932a041cc12a7e.tar.bz2 |
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
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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, |