| Index: base/file_util_posix.cc
|
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
|
| index 073c58ed0cbcdc7b6d632ecea68844dad87f8d06..16c235d2ff239f3cea8d8508c53b63d3b28d42f9 100644
|
| --- a/base/file_util_posix.cc
|
| +++ b/base/file_util_posix.cc
|
| @@ -369,30 +369,20 @@ bool CreateTemporaryFileName(FilePath* path) {
|
| return true;
|
| }
|
|
|
| -FILE* CreateAndOpenTemporaryFile(FilePath* path) {
|
| - FilePath directory;
|
| - if (!GetTempDir(&directory))
|
| - return false;
|
| -
|
| - int fd = CreateAndOpenFdForTemporaryFile(directory, path);
|
| - if (fd < 0)
|
| - return NULL;
|
| -
|
| - FILE *fp = fdopen(fd, "a+");
|
| - return fp;
|
| -}
|
| -
|
| FILE* CreateAndOpenTemporaryShmemFile(FilePath* path) {
|
| FilePath directory;
|
| if (!GetShmemTempDir(&directory))
|
| return false;
|
|
|
| - int fd = CreateAndOpenFdForTemporaryFile(directory, path);
|
| + return CreateAndOpenTemporaryFileInDir(directory, path);
|
| +}
|
| +
|
| +FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path) {
|
| + int fd = CreateAndOpenFdForTemporaryFile(dir, path);
|
| if (fd < 0)
|
| return NULL;
|
|
|
| - FILE *fp = fdopen(fd, "a+");
|
| - return fp;
|
| + return fdopen(fd, "a+");
|
| }
|
|
|
| bool CreateTemporaryFileNameInDir(const std::wstring& dir,
|
|
|