diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-07 00:04:53 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-07 00:04:53 +0000 |
commit | 5a6ddb19886d009376be90a25b14e5a10a26b586 (patch) | |
tree | a4b11d08ca7feee8ccbef9074fe16b0b1f78f0db /base/file_util.cc | |
parent | b2ed3971b1a3a1f13c95d5144652e6c519c10c47 (diff) | |
download | chromium_src-5a6ddb19886d009376be90a25b14e5a10a26b586.zip chromium_src-5a6ddb19886d009376be90a25b14e5a10a26b586.tar.gz chromium_src-5a6ddb19886d009376be90a25b14e5a10a26b586.tar.bz2 |
Move more file_util functions to base namespace.
TBR=sky
Review URL: https://codereview.chromium.org/109043002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.cc')
-rw-r--r-- | base/file_util.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/base/file_util.cc b/base/file_util.cc index 8bcf1a4..1575a07 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -129,7 +129,7 @@ bool TextContentsEqual(const FilePath& filename1, const FilePath& filename2) { bool ReadFileToString(const FilePath& path, std::string* contents) { if (path.ReferencesParent()) return false; - FILE* file = file_util::OpenFile(path, "rb"); + FILE* file = OpenFile(path, "rb"); if (!file) { return false; } @@ -140,7 +140,7 @@ bool ReadFileToString(const FilePath& path, std::string* contents) { if (contents) contents->append(buf, len); } - file_util::CloseFile(file); + CloseFile(file); return true; } @@ -194,16 +194,6 @@ bool TouchFile(const FilePath& path, return false; } -} // namespace base - -// ----------------------------------------------------------------------------- - -namespace file_util { - -using base::FileEnumerator; -using base::FilePath; -using base::kMaxUniqueFiles; - bool CloseFile(FILE* file) { if (file == NULL) return true; @@ -228,6 +218,15 @@ bool TruncateFile(FILE* file) { return true; } +} // namespace base + +// ----------------------------------------------------------------------------- + +namespace file_util { + +using base::FilePath; +using base::kMaxUniqueFiles; + int GetUniquePathNumber( const FilePath& path, const FilePath::StringType& suffix) { |