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
diff --git a/base/file_util.cc b/base/file_util.cc
index f4d0504..4fdc1283 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -343,6 +343,13 @@
bool CreateDirectory(const std::wstring& full_path) {
return CreateDirectory(FilePath::FromWStringHack(full_path));
}
+bool CreateTemporaryFileName(std::wstring* temp_file) {
+ FilePath temp_file_path;
+ if (!CreateTemporaryFileName(&temp_file_path))
+ return false;
+ *temp_file = temp_file_path.ToWStringHack();
+ return true;
+}
bool GetCurrentDirectory(std::wstring* path_str) {
FilePath path;
if (!GetCurrentDirectory(&path))