summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google_apis
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:23:50 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:23:50 +0000
commit82f84b91a10f513cd59b8382a7ab00ed0f179bd5 (patch)
tree125081aff715fbe6815e8bb81889d4d49f887cf3 /chrome/browser/google_apis
parent88a8115978d75161674d97cde0761cbdba73daed (diff)
downloadchromium_src-82f84b91a10f513cd59b8382a7ab00ed0f179bd5.zip
chromium_src-82f84b91a10f513cd59b8382a7ab00ed0f179bd5.tar.gz
chromium_src-82f84b91a10f513cd59b8382a7ab00ed0f179bd5.tar.bz2
Move ReadFileToString to the base namespace.
BUG= Review URL: https://codereview.chromium.org/19579005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google_apis')
-rw-r--r--chrome/browser/google_apis/base_requests_server_unittest.cc4
-rw-r--r--chrome/browser/google_apis/drive_api_requests_unittest.cc6
-rw-r--r--chrome/browser/google_apis/gdata_wapi_requests_unittest.cc2
-rw-r--r--chrome/browser/google_apis/test_util.cc5
4 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/google_apis/base_requests_server_unittest.cc b/chrome/browser/google_apis/base_requests_server_unittest.cc
index c6e2065..896ad0e 100644
--- a/chrome/browser/google_apis/base_requests_server_unittest.cc
+++ b/chrome/browser/google_apis/base_requests_server_unittest.cc
@@ -90,7 +90,7 @@ TEST_F(BaseRequestsServerTest, DownloadFileRequest_ValidFile) {
}
std::string contents;
- file_util::ReadFileToString(temp_file, &contents);
+ base::ReadFileToString(temp_file, &contents);
base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
@@ -100,7 +100,7 @@ TEST_F(BaseRequestsServerTest, DownloadFileRequest_ValidFile) {
const base::FilePath expected_path =
test_util::GetTestFilePath("gdata/testfile.txt");
std::string expected_contents;
- file_util::ReadFileToString(expected_path, &expected_contents);
+ base::ReadFileToString(expected_path, &expected_contents);
EXPECT_EQ(expected_contents, contents);
}
diff --git a/chrome/browser/google_apis/drive_api_requests_unittest.cc b/chrome/browser/google_apis/drive_api_requests_unittest.cc
index 07bfffa..b69048a 100644
--- a/chrome/browser/google_apis/drive_api_requests_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_requests_unittest.cc
@@ -187,8 +187,8 @@ class DriveApiRequestsTest : public testing::Test {
response->set_code(net::HTTP_PRECONDITION_FAILED);
std::string content;
- if (file_util::ReadFileToString(expected_precondition_failed_file_path_,
- &content)) {
+ if (base::ReadFileToString(expected_precondition_failed_file_path_,
+ &content)) {
response->set_content(content);
response->set_content_type("application/json");
}
@@ -1588,7 +1588,7 @@ TEST_F(DriveApiRequestsTest, DownloadFileRequest) {
}
std::string contents;
- file_util::ReadFileToString(temp_file, &contents);
+ base::ReadFileToString(temp_file, &contents);
base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
diff --git a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
index 609eb05..08ca8e7 100644
--- a/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_requests_unittest.cc
@@ -1580,7 +1580,7 @@ TEST_F(GDataWapiRequestsTest, DownloadFileRequest) {
}
std::string contents;
- file_util::ReadFileToString(temp_file, &contents);
+ base::ReadFileToString(temp_file, &contents);
base::DeleteFile(temp_file, false);
EXPECT_EQ(HTTP_SUCCESS, result_code);
diff --git a/chrome/browser/google_apis/test_util.cc b/chrome/browser/google_apis/test_util.cc
index dd7a3fc..934042e 100644
--- a/chrome/browser/google_apis/test_util.cc
+++ b/chrome/browser/google_apis/test_util.cc
@@ -93,7 +93,7 @@ scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path) {
scoped_ptr<net::test_server::BasicHttpResponse> CreateHttpResponseFromFile(
const base::FilePath& file_path) {
std::string content;
- if (!file_util::ReadFileToString(file_path, &content))
+ if (!base::ReadFileToString(file_path, &content))
return scoped_ptr<net::test_server::BasicHttpResponse>();
std::string content_type = "text/plain";
@@ -130,8 +130,7 @@ bool VerifyJsonData(const base::FilePath& expected_json_file_path,
}
std::string expected_content;
- if (!file_util::ReadFileToString(
- expected_json_file_path, &expected_content)) {
+ if (!base::ReadFileToString(expected_json_file_path, &expected_content)) {
LOG(ERROR) << "Failed to read file: " << expected_json_file_path.value();
return false;
}