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

Unified Diff: base/file_util.h

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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 | « base/debug/proc_maps_linux.cc ('k') | base/file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 9673a6111fead5450e04ce2a60ae78f11a7b8ce4..b4150f7368a1bba3e76f79c07f5a7c33105dc3ab 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -132,19 +132,18 @@ BASE_EXPORT bool ContentsEqual(const FilePath& filename1,
BASE_EXPORT bool TextContentsEqual(const FilePath& filename1,
const FilePath& filename2);
-} // namespace base
-
-// -----------------------------------------------------------------------------
-
-namespace file_util {
-
// Read the file at |path| into |contents|, returning true on success.
// This function fails if the |path| contains path traversal components ('..').
// |contents| may be NULL, in which case this function is useful for its
// side effect of priming the disk cache.
// Useful for unit tests.
-BASE_EXPORT bool ReadFileToString(const base::FilePath& path,
- std::string* contents);
+BASE_EXPORT bool ReadFileToString(const FilePath& path, std::string* contents);
+
+} // namespace base
+
+// -----------------------------------------------------------------------------
+
+namespace file_util {
#if defined(OS_POSIX)
// Read exactly |bytes| bytes from file descriptor |fd|, storing the result
« no previous file with comments | « base/debug/proc_maps_linux.cc ('k') | base/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698