Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: trunk/src/base/file_util.cc

Issue 105823009: Revert 239280 "Move more file_util functions to base namespace." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/base/file_util.h ('k') | trunk/src/base/file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/file_util.cc
===================================================================
--- trunk/src/base/file_util.cc (revision 239399)
+++ trunk/src/base/file_util.cc (working copy)
@@ -129,7 +129,7 @@
bool ReadFileToString(const FilePath& path, std::string* contents) {
if (path.ReferencesParent())
return false;
- FILE* file = OpenFile(path, "rb");
+ FILE* file = file_util::OpenFile(path, "rb");
if (!file) {
return false;
}
@@ -140,7 +140,7 @@
if (contents)
contents->append(buf, len);
}
- CloseFile(file);
+ file_util::CloseFile(file);
return true;
}
@@ -194,6 +194,16 @@
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;
@@ -218,15 +228,6 @@
return true;
}
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
-using base::FilePath;
-using base::kMaxUniqueFiles;
-
int GetUniquePathNumber(
const FilePath& path,
const FilePath::StringType& suffix) {
« no previous file with comments | « trunk/src/base/file_util.h ('k') | trunk/src/base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698