summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 15:22:26 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 15:22:26 +0000
commit7557b001ffff819d34a20a22e81092ec0d28e350 (patch)
treeb6818652ff0f8e58a92b11d215d2e3520e82cb93
parent1d16be87574156e7e47d5d06245d54ba80a0f914 (diff)
downloadchromium_src-7557b001ffff819d34a20a22e81092ec0d28e350.zip
chromium_src-7557b001ffff819d34a20a22e81092ec0d28e350.tar.gz
chromium_src-7557b001ffff819d34a20a22e81092ec0d28e350.tar.bz2
Shuffle some of the functions in file_util.h.
(A followup from r54316.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54321 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/file_util.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/base/file_util.h b/base/file_util.h
index bfd819e..66e450a 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -251,22 +251,27 @@ FilePath GetHomeDir();
// be empty and all handles closed after this function returns.
bool CreateTemporaryFile(FilePath* path);
+// Same as CreateTemporaryFile but the file is created in |dir|.
+bool CreateTemporaryFileInDir(const FilePath& dir, FilePath* temp_file);
+
// Create and open a temporary file. File is opened for read/write.
// The full path is placed in |path|.
// Returns a handle to the opened file or NULL if an error occured.
FILE* CreateAndOpenTemporaryFile(FilePath* path);
// Like above but for shmem files. Only useful for POSIX.
FILE* CreateAndOpenTemporaryShmemFile(FilePath* path);
-
// Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir, FilePath* path);
-// Same as CreateTemporaryFile but the file is created in |dir|.
-bool CreateTemporaryFileInDir(const FilePath& dir,
- FilePath* temp_file);
+// Create a new directory. If prefix is provided, the new directory name is in
+// the format of prefixyyyy.
+// NOTE: prefix is ignored in the POSIX implementation.
+// If success, return true and output the full path of the directory created.
+bool CreateNewTempDirectory(const FilePath::StringType& prefix,
+ FilePath* new_temp_path);
// Create a directory within another directory.
-// Extra characters will be appended to |name_tmpl| to ensure that the
+// Extra characters will be appended to |prefix| to ensure that the
// new directory does not have the same name as an existing directory.
// If |loosen_permissions| is true, the new directory will be readable
// and writable to all users on windows. It is ignored on other platforms.
@@ -277,14 +282,6 @@ bool CreateTemporaryDirInDir(const FilePath& base_dir,
bool loosen_permissions,
FilePath* new_dir);
-// Create a new directory under TempPath. If prefix is provided, the new
-// directory name is in the format of prefixyyyy.
-// NOTE: prefix is ignored in the POSIX implementation.
-// TODO(erikkay): is this OK?
-// If success, return true and output the full path of the directory created.
-bool CreateNewTempDirectory(const FilePath::StringType& prefix,
- FilePath* new_temp_path);
-
// Creates a directory, as well as creating any parent directories, if they
// don't exist. Returns 'true' on successful creation, or if the directory
// already exists. The directory is only readable by the current user.