summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-28 00:22:46 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-28 00:22:46 +0000
commit3c5281026a2bd92b33eb46418b46baec351d99ee (patch)
tree876df6c4c36a8764bdb073eb8ae71a548f786de3 /base/file_util.cc
parentd7483fd119690067a7f31df60b612e1606567d0b (diff)
downloadchromium_src-3c5281026a2bd92b33eb46418b46baec351d99ee.zip
chromium_src-3c5281026a2bd92b33eb46418b46baec351d99ee.tar.gz
chromium_src-3c5281026a2bd92b33eb46418b46baec351d99ee.tar.bz2
Add FilePath version of ReadFileToString.
Review URL: http://codereview.chromium.org/19401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index 8ecb1cc..916bc3c 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -249,7 +249,7 @@ bool ContentsEqual(const FilePath& filename1, const FilePath& filename2) {
return true;
}
-bool ReadFileToString(const std::wstring& path, std::string* contents) {
+bool ReadFileToString(const FilePath& path, std::string* contents) {
FILE* file = OpenFile(path, "rb");
if (!file) {
return false;
@@ -349,6 +349,10 @@ bool MemoryMappedFile::IsValid() {
// Deprecated functions ----------------------------------------------------
+bool ReadFileToString(const std::wstring& path, std::string* contents) {
+ return ReadFileToString(FilePath::FromWStringHack(path), contents);
+}
+
bool AbsolutePath(std::wstring* path_str) {
FilePath path(FilePath::FromWStringHack(*path_str));
if (!AbsolutePath(&path))