summaryrefslogtreecommitdiffstats
path: root/chrome/browser
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
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')
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc2
-rw-r--r--chrome/browser/browser_shutdown.cc2
-rw-r--r--chrome/browser/chromeos/app_mode/kiosk_app_data.cc2
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc4
-rw-r--r--chrome/browser/chromeos/customization_document.cc4
-rw-r--r--chrome/browser/chromeos/drive/fake_file_system_unittest.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_cache_unittest.cc8
-rw-r--r--chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc2
-rw-r--r--chrome/browser/chromeos/drive/file_system_unittest.cc2
-rw-r--r--chrome/browser/chromeos/drive/job_scheduler_unittest.cc8
-rw-r--r--chrome/browser/chromeos/drive/sync_client_unittest.cc4
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc2
-rw-r--r--chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.cc4
-rw-r--r--chrome/browser/chromeos/external_metrics.cc2
-rw-r--r--chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc2
-rw-r--r--chrome/browser/chromeos/login/kiosk_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc2
-rw-r--r--chrome/browser/chromeos/login/oobe_browsertest.cc4
-rw-r--r--chrome/browser/chromeos/login/screens/update_screen.cc2
-rw-r--r--chrome/browser/chromeos/login/user_image_loader.cc2
-rw-r--r--chrome/browser/chromeos/mobile/mobile_activator.cc2
-rw-r--r--chrome/browser/chromeos/mobile_config.cc4
-rw-r--r--chrome/browser/chromeos/policy/device_local_account_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/policy/user_policy_disk_cache.cc2
-rw-r--r--chrome/browser/chromeos/policy/user_policy_token_loader.cc2
-rw-r--r--chrome/browser/chromeos/swap_metrics.cc4
-rw-r--r--chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc3
-rw-r--r--chrome/browser/chromeos/system/syslogs_provider.cc5
-rw-r--r--chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc2
-rw-r--r--chrome/browser/chromeos/system_logs/lsb_release_log_source.cc2
-rw-r--r--chrome/browser/chromeos/version_loader.cc4
-rw-r--r--chrome/browser/component_updater/default_component_installer.cc4
-rw-r--r--chrome/browser/diagnostics/recon_diagnostics.cc2
-rw-r--r--chrome/browser/download/download_browsertest.cc9
-rw-r--r--chrome/browser/download/save_page_browsertest.cc2
-rw-r--r--chrome/browser/drive/fake_drive_service.cc2
-rw-r--r--chrome/browser/drive/fake_drive_service_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc3
-rw-r--r--chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/music_manager_private/device_id_linux.cc2
-rw-r--r--chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc2
-rw-r--r--chrome/browser/extensions/component_loader_unittest.cc2
-rw-r--r--chrome/browser/extensions/convert_user_script.cc2
-rw-r--r--chrome/browser/extensions/convert_web_app_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_action_icon_factory_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc3
-rw-r--r--chrome/browser/extensions/extension_creator.cc3
-rw-r--r--chrome/browser/extensions/extension_resource_request_policy_apitest.cc2
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc6
-rw-r--r--chrome/browser/extensions/gtalk_extension_browsertest.cc2
-rw-r--r--chrome/browser/extensions/image_loader.cc2
-rw-r--r--chrome/browser/extensions/sandboxed_unpacker.cc4
-rw-r--r--chrome/browser/extensions/user_script_master.cc2
-rw-r--r--chrome/browser/feedback/feedback_util.cc2
-rw-r--r--chrome/browser/google/google_update_settings_posix.cc2
-rw-r--r--chrome/browser/google/google_util_chromeos.cc2
-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
-rw-r--r--chrome/browser/history/expire_history_backend_unittest.cc2
-rw-r--r--chrome/browser/history/history_unittest_base.cc2
-rw-r--r--chrome/browser/history/url_index_private_data.cc2
-rw-r--r--chrome/browser/icon_loader_linux.cc2
-rw-r--r--chrome/browser/media/webrtc_log_uploader.cc2
-rw-r--r--chrome/browser/media/webrtc_log_uploader_unittest.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/itunes_finder_win.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc2
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc4
-rw-r--r--chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm4
-rw-r--r--chrome/browser/nacl_host/nacl_browser.cc2
-rw-r--r--chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc4
-rw-r--r--chrome/browser/net/crl_set_fetcher.cc4
-rw-r--r--chrome/browser/net/firefox_proxy_settings.cc2
-rw-r--r--chrome/browser/net/proxy_browsertest.cc2
-rw-r--r--chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc4
-rw-r--r--chrome/browser/net/transport_security_persister.cc2
-rw-r--r--chrome/browser/net/transport_security_persister_unittest.cc2
-rw-r--r--chrome/browser/page_cycler/page_cycler.cc2
-rw-r--r--chrome/browser/page_cycler/page_cycler_browsertest.cc3
-rw-r--r--chrome/browser/page_cycler/page_cycler_unittest.cc12
-rw-r--r--chrome/browser/policy/cloud/cloud_policy_browsertest.cc9
-rw-r--r--chrome/browser/policy/cloud/resource_cache.cc4
-rw-r--r--chrome/browser/policy/cloud/user_cloud_policy_store.cc2
-rw-r--r--chrome/browser/policy/policy_prefs_browsertest.cc2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud_interative_uitest.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud_unittest.cc2
-rw-r--r--chrome/browser/profiles/profile_info_cache.cc2
-rw-r--r--chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc18
-rw-r--r--chrome/browser/renderer_host/pepper/device_id_fetcher.cc2
-rw-r--r--chrome/browser/safe_browsing/download_protection_service_unittest.cc6
-rw-r--r--chrome/browser/search_engines/template_url_parser_unittest.cc2
-rw-r--r--chrome/browser/sessions/better_session_restore_browsertest.cc2
-rw-r--r--chrome/browser/shell_integration_linux.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary.cc2
-rw-r--r--chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc2
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc2
-rw-r--r--chrome/browser/sxs_linux.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc2
-rw-r--r--chrome/browser/sync/test/integration/bookmarks_helper.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_test.cc2
-rw-r--r--chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc3
-rw-r--r--chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc2
-rw-r--r--chrome/browser/sync_file_system/local/canned_syncable_file_system.cc2
-rw-r--r--chrome/browser/ui/browser_focus_uitest.cc2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/about_ui.cc7
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc2
-rw-r--r--chrome/browser/ui/webui/profiler_ui.cc2
-rw-r--r--chrome/browser/upload_list.cc2
-rw-r--r--chrome/browser/user_style_sheet_watcher.cc2
117 files changed, 168 insertions, 185 deletions
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 96042e4..76f9c69 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -199,7 +199,7 @@ class AutofillTest : public InProcessBrowserTest {
base::FilePath data_file =
ui_test_utils::GetTestFilePath(base::FilePath().AppendASCII("autofill"),
base::FilePath().AppendASCII(filename));
- CHECK(file_util::ReadFileToString(data_file, &data));
+ CHECK(base::ReadFileToString(data_file, &data));
std::vector<std::string> lines;
base::SplitString(data, '\n', &lines);
int parsed_profiles = 0;
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index bfbe171..e97ccbb 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -263,7 +263,7 @@ void ReadLastShutdownFile(ShutdownType type,
base::FilePath shutdown_ms_file = GetShutdownMsPath();
std::string shutdown_ms_str;
int64 shutdown_ms = 0;
- if (file_util::ReadFileToString(shutdown_ms_file, &shutdown_ms_str))
+ if (base::ReadFileToString(shutdown_ms_file, &shutdown_ms_str))
base::StringToInt64(shutdown_ms_str, &shutdown_ms);
base::DeleteFile(shutdown_ms_file, false);
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
index acedc21..104a367 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
@@ -112,7 +112,7 @@ class KioskAppData::IconLoader : public ImageDecoder::Delegate {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
std::string data;
- if (!file_util::ReadFileToString(base::FilePath(icon_path_), &data)) {
+ if (!base::ReadFileToString(base::FilePath(icon_path_), &data)) {
ReportResultOnBlockingPool(FAILED_TO_LOAD);
return;
}
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 2ef50a1..2232596 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -261,8 +261,8 @@ BootTimesLoader::Stats BootTimesLoader::GetCurrentStats() {
const base::FilePath kDiskStat(FPL("/sys/block/sda/stat"));
Stats stats;
base::ThreadRestrictions::ScopedAllowIO allow_io;
- file_util::ReadFileToString(kProcUptime, &stats.uptime);
- file_util::ReadFileToString(kDiskStat, &stats.disk);
+ base::ReadFileToString(kProcUptime, &stats.uptime);
+ base::ReadFileToString(kDiskStat, &stats.disk);
return stats;
}
diff --git a/chrome/browser/chromeos/customization_document.cc b/chrome/browser/chromeos/customization_document.cc
index a625cd4..24adaf3 100644
--- a/chrome/browser/chromeos/customization_document.cc
+++ b/chrome/browser/chromeos/customization_document.cc
@@ -80,7 +80,7 @@ CustomizationDocument::~CustomizationDocument() {}
bool CustomizationDocument::LoadManifestFromFile(
const base::FilePath& manifest_path) {
std::string manifest;
- if (!file_util::ReadFileToString(manifest_path, &manifest))
+ if (!base::ReadFileToString(manifest_path, &manifest))
return false;
return LoadManifestFromString(manifest);
}
@@ -280,7 +280,7 @@ void ServicesCustomizationDocument::ReadFileInBackground(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::string manifest;
- if (file_util::ReadFileToString(file, &manifest)) {
+ if (base::ReadFileToString(file, &manifest)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(
base::IgnoreResult(
diff --git a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
index be15012..532d351 100644
--- a/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/fake_file_system_unittest.cc
@@ -94,7 +94,7 @@ TEST_F(FakeFileSystemTest, GetFileContentByPath) {
// Make sure the cached file's content.
std::string cache_file_content;
ASSERT_TRUE(
- file_util::ReadFileToString(cache_file_path, &cache_file_content));
+ base::ReadFileToString(cache_file_path, &cache_file_content));
EXPECT_EQ(content, cache_file_content);
}
diff --git a/chrome/browser/chromeos/drive/file_cache_unittest.cc b/chrome/browser/chromeos/drive/file_cache_unittest.cc
index 7c7b947..205271c 100644
--- a/chrome/browser/chromeos/drive/file_cache_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_cache_unittest.cc
@@ -918,11 +918,11 @@ TEST_F(FileCacheTest, RenameCacheFilesToNewFormat) {
// Rename and verify the result.
RenameCacheFilesToNewFormat(cache_.get());
std::string contents;
- EXPECT_TRUE(file_util::ReadFileToString(file_directory.AppendASCII("id_koo"),
+ EXPECT_TRUE(base::ReadFileToString(file_directory.AppendASCII("id_koo"),
&contents));
EXPECT_EQ("koo", contents);
contents.clear();
- EXPECT_TRUE(file_util::ReadFileToString(file_directory.AppendASCII("id_kyu"),
+ EXPECT_TRUE(base::ReadFileToString(file_directory.AppendASCII("id_kyu"),
&contents));
EXPECT_EQ("kyu", contents);
@@ -931,11 +931,11 @@ TEST_F(FileCacheTest, RenameCacheFilesToNewFormat) {
// Files with new style names are not affected.
contents.clear();
- EXPECT_TRUE(file_util::ReadFileToString(file_directory.AppendASCII("id_koo"),
+ EXPECT_TRUE(base::ReadFileToString(file_directory.AppendASCII("id_koo"),
&contents));
EXPECT_EQ("koo", contents);
contents.clear();
- EXPECT_TRUE(file_util::ReadFileToString(file_directory.AppendASCII("id_kyu"),
+ EXPECT_TRUE(base::ReadFileToString(file_directory.AppendASCII("id_kyu"),
&contents));
EXPECT_EQ("kyu", contents);
}
diff --git a/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
index 1897809..0109d94 100644
--- a/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system/truncate_operation_unittest.cc
@@ -114,7 +114,7 @@ TEST_F(TruncateOperationTest, Extend) {
// The local file should be truncated.
std::string content;
- ASSERT_TRUE(file_util::ReadFileToString(local_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(local_path, &content));
EXPECT_EQ(file_size + 10, static_cast<int64>(content.size()));
// All trailing 10 bytes should be '\0'.
diff --git a/chrome/browser/chromeos/drive/file_system_unittest.cc b/chrome/browser/chromeos/drive/file_system_unittest.cc
index 8a7ec26..04e5ba5 100644
--- a/chrome/browser/chromeos/drive/file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_unittest.cc
@@ -749,7 +749,7 @@ TEST_F(FileSystemTest, OpenAndCloseFile) {
// Verify that the file contents match the expected contents.
const std::string kExpectedContent = "This is some test content.";
std::string cache_file_data;
- EXPECT_TRUE(file_util::ReadFileToString(opened_file_path, &cache_file_data));
+ EXPECT_TRUE(base::ReadFileToString(opened_file_path, &cache_file_data));
EXPECT_EQ(kExpectedContent, cache_file_data);
FileCacheEntry cache_entry;
diff --git a/chrome/browser/chromeos/drive/job_scheduler_unittest.cc b/chrome/browser/chromeos/drive/job_scheduler_unittest.cc
index 2b06f85c..331e75f 100644
--- a/chrome/browser/chromeos/drive/job_scheduler_unittest.cc
+++ b/chrome/browser/chromeos/drive/job_scheduler_unittest.cc
@@ -658,7 +658,7 @@ TEST_F(JobSchedulerTest, DownloadFileCellularDisabled) {
EXPECT_EQ(google_apis::HTTP_SUCCESS, download_error);
std::string content;
EXPECT_EQ(output_file_path, kOutputFilePath);
- ASSERT_TRUE(file_util::ReadFileToString(output_file_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(output_file_path, &content));
EXPECT_EQ("This is some test content.", content);
}
@@ -711,7 +711,7 @@ TEST_F(JobSchedulerTest, DownloadFileWimaxDisabled) {
EXPECT_EQ(google_apis::HTTP_SUCCESS, download_error);
std::string content;
EXPECT_EQ(output_file_path, kOutputFilePath);
- ASSERT_TRUE(file_util::ReadFileToString(output_file_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(output_file_path, &content));
EXPECT_EQ("This is some test content.", content);
}
@@ -756,7 +756,7 @@ TEST_F(JobSchedulerTest, DownloadFileCellularEnabled) {
EXPECT_EQ(google_apis::HTTP_SUCCESS, download_error);
std::string content;
EXPECT_EQ(output_file_path, kOutputFilePath);
- ASSERT_TRUE(file_util::ReadFileToString(output_file_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(output_file_path, &content));
EXPECT_EQ("This is some test content.", content);
}
@@ -801,7 +801,7 @@ TEST_F(JobSchedulerTest, DownloadFileWimaxEnabled) {
EXPECT_EQ(google_apis::HTTP_SUCCESS, download_error);
std::string content;
EXPECT_EQ(output_file_path, kOutputFilePath);
- ASSERT_TRUE(file_util::ReadFileToString(output_file_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(output_file_path, &content));
EXPECT_EQ("This is some test content.", content);
}
diff --git a/chrome/browser/chromeos/drive/sync_client_unittest.cc b/chrome/browser/chromeos/drive/sync_client_unittest.cc
index d67be23..2e41540 100644
--- a/chrome/browser/chromeos/drive/sync_client_unittest.cc
+++ b/chrome/browser/chromeos/drive/sync_client_unittest.cc
@@ -286,13 +286,13 @@ TEST_F(SyncClientTest, ExistingPinnedFiles) {
std::string content;
EXPECT_EQ(FILE_ERROR_OK, cache_->GetFile(resource_ids_["fetched"],
&cache_file));
- EXPECT_TRUE(file_util::ReadFileToString(cache_file, &content));
+ EXPECT_TRUE(base::ReadFileToString(cache_file, &content));
EXPECT_EQ(kRemoteContent, content);
content.clear();
EXPECT_EQ(FILE_ERROR_OK, cache_->GetFile(resource_ids_["dirty"],
&cache_file));
- EXPECT_TRUE(file_util::ReadFileToString(cache_file, &content));
+ EXPECT_TRUE(base::ReadFileToString(cache_file, &content));
EXPECT_EQ(kLocalContent, content);
}
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
index 7dae077..5fac57c 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_handler_api_test.cc
@@ -59,7 +59,7 @@ struct TestCase {
void ExpectFileContentEquals(const base::FilePath& selected_path,
const std::string& expected_contents) {
std::string test_file_contents;
- ASSERT_TRUE(file_util::ReadFileToString(selected_path, &test_file_contents));
+ ASSERT_TRUE(base::ReadFileToString(selected_path, &test_file_contents));
EXPECT_EQ(expected_contents, test_file_contents);
}
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc
index 618f1a1..b8a4e78 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_browsertest.cc
@@ -250,7 +250,7 @@ class DriveTestVolume {
base::FilePath source_file_path =
google_apis::test_util::GetTestFilePath("chromeos/file_manager").
AppendASCII(source_file_name);
- ASSERT_TRUE(file_util::ReadFileToString(source_file_path, &content_data));
+ ASSERT_TRUE(base::ReadFileToString(source_file_path, &content_data));
}
scoped_ptr<google_apis::ResourceEntry> resource_entry;
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index 5fc5876..32deb31 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -99,7 +99,7 @@ bool GetData(const base::FilePath& path, std::string* data) {
return false;
return !base::PathExists(path) ||
- file_util::ReadFileToString(path, data);
+ base::ReadFileToString(path, data);
}
class WindowStateManager;
@@ -386,7 +386,7 @@ void WallpaperPrivateSetWallpaperIfExistsFunction::
path = fallback_path;
if (base::PathExists(path) &&
- file_util::ReadFileToString(path, &data)) {
+ base::ReadFileToString(path, &data)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&WallpaperPrivateSetWallpaperIfExistsFunction::StartDecode,
this, data));
diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc
index 4e7dd11..98b62c4 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -106,7 +106,7 @@ void SetupProgressiveScanFieldTrial() {
bool Is2GBParrot() {
base::FilePath path("/etc/lsb-release");
std::string contents;
- if (!file_util::ReadFileToString(path, &contents))
+ if (!base::ReadFileToString(path, &contents))
return false;
if (contents.find("CHROMEOS_RELEASE_BOARD=parrot") == std::string::npos)
return false;
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
index 2a61f89..0788b30 100644
--- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
@@ -257,7 +257,7 @@ void ComponentExtensionIMEManagerImpl::ReadComponentExtensionsInfo(
!base::PathExists(manifest_path))
continue;
- if (!file_util::ReadFileToString(manifest_path, &component_ime.manifest))
+ if (!base::ReadFileToString(manifest_path, &component_ime.manifest))
continue;
scoped_ptr<DictionaryValue> manifest = GetManifest(component_ime.path);
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc
index c1fcf41..3c5d1f1 100644
--- a/chrome/browser/chromeos/login/kiosk_browsertest.cc
+++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -181,8 +181,8 @@ class KioskTest : public InProcessBrowserTest,
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
base::FilePath test_data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
- CHECK(file_util::ReadFileToString(test_data_dir.Append(kServiceLogin),
- &service_login_response_));
+ CHECK(base::ReadFileToString(test_data_dir.Append(kServiceLogin),
+ &service_login_response_));
host_resolver()->AddRule(kWebstoreDomain, "127.0.0.1");
}
diff --git a/chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc b/chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc
index cffa7cd..380d1d6 100644
--- a/chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc
+++ b/chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.cc
@@ -30,7 +30,7 @@ std::string LoadSyncToken() {
std::string token;
base::FilePath token_file =
file_util::GetHomeDir().Append(kManagedUserTokenFilename);
- if (!file_util::ReadFileToString(token_file, &token)) {
+ if (!base::ReadFileToString(token_file, &token)) {
return std::string();
}
return token;
diff --git a/chrome/browser/chromeos/login/oobe_browsertest.cc b/chrome/browser/chromeos/login/oobe_browsertest.cc
index ea19642..f33c01b 100644
--- a/chrome/browser/chromeos/login/oobe_browsertest.cc
+++ b/chrome/browser/chromeos/login/oobe_browsertest.cc
@@ -145,8 +145,8 @@ class OobeTest : public InProcessBrowserTest {
content_browser_client_.get());
base::FilePath test_data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
- CHECK(file_util::ReadFileToString(test_data_dir.Append(kServiceLogin),
- &service_login_response_));
+ CHECK(base::ReadFileToString(test_data_dir.Append(kServiceLogin),
+ &service_login_response_));
}
virtual void SetUpOnMainThread() OVERRIDE {
diff --git a/chrome/browser/chromeos/login/screens/update_screen.cc b/chrome/browser/chromeos/login/screens/update_screen.cc
index 82b79b9..4469c12 100644
--- a/chrome/browser/chromeos/login/screens/update_screen.cc
+++ b/chrome/browser/chromeos/login/screens/update_screen.cc
@@ -460,7 +460,7 @@ bool UpdateScreen::HasCriticalUpdate() {
// Temporarily allow it until we fix http://crosbug.com/11106
base::ThreadRestrictions::ScopedAllowIO allow_io;
base::FilePath update_deadline_file_path(kUpdateDeadlineFile);
- if (!file_util::ReadFileToString(update_deadline_file_path, &deadline) ||
+ if (!base::ReadFileToString(update_deadline_file_path, &deadline) ||
deadline.empty()) {
return false;
}
diff --git a/chrome/browser/chromeos/login/user_image_loader.cc b/chrome/browser/chromeos/login/user_image_loader.cc
index 05db624..2148180 100644
--- a/chrome/browser/chromeos/login/user_image_loader.cc
+++ b/chrome/browser/chromeos/login/user_image_loader.cc
@@ -71,7 +71,7 @@ void UserImageLoader::LoadImage(
DCHECK(task_runner->RunsTasksOnCurrentThread());
std::string image_data;
- file_util::ReadFileToString(base::FilePath(filepath), &image_data);
+ base::ReadFileToString(base::FilePath(filepath), &image_data);
scoped_refptr<ImageDecoder> image_decoder =
new ImageDecoder(this, image_data, image_codec_);
diff --git a/chrome/browser/chromeos/mobile/mobile_activator.cc b/chrome/browser/chromeos/mobile/mobile_activator.cc
index d0d3802..9475e6e 100644
--- a/chrome/browser/chromeos/mobile/mobile_activator.cc
+++ b/chrome/browser/chromeos/mobile/mobile_activator.cc
@@ -118,7 +118,7 @@ void CellularConfigDocument::SetErrorMap(
bool CellularConfigDocument::LoadFromFile(const base::FilePath& config_path) {
std::string config;
- if (!file_util::ReadFileToString(config_path, &config))
+ if (!base::ReadFileToString(config_path, &config))
return false;
scoped_ptr<Value> root(
diff --git a/chrome/browser/chromeos/mobile_config.cc b/chrome/browser/chromeos/mobile_config.cc
index 78198f6..a0503ca 100644
--- a/chrome/browser/chromeos/mobile_config.cc
+++ b/chrome/browser/chromeos/mobile_config.cc
@@ -360,11 +360,11 @@ void MobileConfig::ReadConfigInBackground(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::string global_config;
std::string local_config;
- if (!file_util::ReadFileToString(global_config_file, &global_config)) {
+ if (!base::ReadFileToString(global_config_file, &global_config)) {
VLOG(1) << "Failed to load global mobile config from: "
<< global_config_file.value();
}
- if (!file_util::ReadFileToString(local_config_file, &local_config)) {
+ if (!base::ReadFileToString(local_config_file, &local_config)) {
VLOG(1) << "Failed to load local mobile config from: "
<< local_config_file.value();
}
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index 450f192..c125281 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -561,7 +561,7 @@ IN_PROC_BROWSER_TEST_P(TermsOfServiceTest, TermsOfServiceScreen) {
base::FilePath test_dir;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
std::string terms_of_service;
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
test_dir.Append(kExistentTermsOfServicePath), &terms_of_service));
EXPECT_EQ(terms_of_service, content);
EXPECT_FALSE(error);
diff --git a/chrome/browser/chromeos/policy/user_policy_disk_cache.cc b/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
index bb93e89..e9249cd 100644
--- a/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
+++ b/chrome/browser/chromeos/policy/user_policy_disk_cache.cc
@@ -73,7 +73,7 @@ void UserPolicyDiskCache::LoadOnFileThread() {
// Read the protobuf from the file.
std::string data;
- if (!file_util::ReadFileToString(backing_file_path_, &data)) {
+ if (!base::ReadFileToString(backing_file_path_, &data)) {
LOG(WARNING) << "Failed to read policy data from "
<< backing_file_path_.value();
LoadDone(LOAD_RESULT_READ_ERROR, cached_response);
diff --git a/chrome/browser/chromeos/policy/user_policy_token_loader.cc b/chrome/browser/chromeos/policy/user_policy_token_loader.cc
index b20c4d2..1501e6c 100644
--- a/chrome/browser/chromeos/policy/user_policy_token_loader.cc
+++ b/chrome/browser/chromeos/policy/user_policy_token_loader.cc
@@ -61,7 +61,7 @@ void UserPolicyTokenLoader::LoadOnFileThread() {
if (base::PathExists(cache_file_)) {
std::string data;
em::DeviceCredentials device_credentials;
- if (file_util::ReadFileToString(cache_file_, &data) &&
+ if (base::ReadFileToString(cache_file_, &data) &&
device_credentials.ParseFromArray(data.c_str(), data.size())) {
device_token = device_credentials.device_token();
device_id = device_credentials.device_id();
diff --git a/chrome/browser/chromeos/swap_metrics.cc b/chrome/browser/chromeos/swap_metrics.cc
index efebac3..974fcc8 100644
--- a/chrome/browser/chromeos/swap_metrics.cc
+++ b/chrome/browser/chromeos/swap_metrics.cc
@@ -261,7 +261,7 @@ bool SwapMetrics::Backend::GetFieldFromKernelOutput(const std::string& path,
const std::string& field,
int64* value) {
std::string file_content;
- if (!file_util::ReadFileToString(FilePath(path), &file_content)) {
+ if (!base::ReadFileToString(FilePath(path), &file_content)) {
LOG(WARNING) << "Cannot read " << path;
return false;
}
@@ -296,7 +296,7 @@ bool SwapMetrics::Backend::TokenizeOneLineFile(const std::string& path,
std::vector<std::string>*
tokens) {
std::string file_content;
- if (!file_util::ReadFileToString(FilePath(path), &file_content)) {
+ if (!base::ReadFileToString(FilePath(path), &file_content)) {
LOG(WARNING) << "cannot read " << path;
return false;
}
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
index 6f76b35..7aac719 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
@@ -478,8 +478,7 @@ void AutomaticRebootManagerBasicTest::CreateAutomaticRebootManager(
bool AutomaticRebootManagerBasicTest::ReadUpdateRebootNeededUptimeFromFile(
base::TimeDelta* uptime) {
std::string contents;
- if (!file_util::ReadFileToString(update_reboot_needed_uptime_file_,
- &contents)) {
+ if (!base::ReadFileToString(update_reboot_needed_uptime_file_, &contents)) {
return false;
}
double seconds;
diff --git a/chrome/browser/chromeos/system/syslogs_provider.cc b/chrome/browser/chromeos/system/syslogs_provider.cc
index 279d837..5a1c00e 100644
--- a/chrome/browser/chromeos/system/syslogs_provider.cc
+++ b/chrome/browser/chromeos/system/syslogs_provider.cc
@@ -142,8 +142,7 @@ LogDictionaryType* GetSystemLogs(base::FilePath* zip_file_name,
}
// Read logs from the temp file
std::string data;
- bool read_success = file_util::ReadFileToString(temp_filename,
- &data);
+ bool read_success = base::ReadFileToString(temp_filename, &data);
// if we were using an internal temp file, the user does not need the
// logs to stay past the ReadFile call - delete the file
base::DeleteFile(temp_filename, false);
@@ -348,7 +347,7 @@ void SyslogsProviderImpl::ReadSyslogs(
void SyslogsProviderImpl::LoadCompressedLogs(const base::FilePath& zip_file,
std::string* zip_content) {
DCHECK(zip_content);
- if (!file_util::ReadFileToString(zip_file, zip_content)) {
+ if (!base::ReadFileToString(zip_file, zip_content)) {
LOG(ERROR) << "Cannot read compressed logs file from " <<
zip_file.value().c_str();
}
diff --git a/chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc b/chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc
index 7127c76..c3a3368 100644
--- a/chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc
+++ b/chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc
@@ -160,7 +160,7 @@ void DebugDaemonLogSource::ReadUserLogFiles(
std::string value;
std::string filename = it->second;
base::FilePath profile_dir = last_used_profiles[i]->GetPath();
- bool read_success = file_util::ReadFileToString(
+ bool read_success = base::ReadFileToString(
profile_dir.Append(filename), &value);
if (read_success && !value.empty())
diff --git a/chrome/browser/chromeos/system_logs/lsb_release_log_source.cc b/chrome/browser/chromeos/system_logs/lsb_release_log_source.cc
index e1ad87e..d6b0564 100644
--- a/chrome/browser/chromeos/system_logs/lsb_release_log_source.cc
+++ b/chrome/browser/chromeos/system_logs/lsb_release_log_source.cc
@@ -44,7 +44,7 @@ void LsbReleaseLogSource::ReadLSBRelease(SystemLogsResponse* response) {
const base::FilePath lsb_release_file("/etc/lsb-release");
std::string lsb_data;
- bool read_success = file_util::ReadFileToString(lsb_release_file, &lsb_data);
+ bool read_success = base::ReadFileToString(lsb_release_file, &lsb_data);
// if we were using an internal temp file, the user does not need the
// logs to stay past the ReadFile call - delete the file
if (!read_success) {
diff --git a/chrome/browser/chromeos/version_loader.cc b/chrome/browser/chromeos/version_loader.cc
index 921c60b..5ee7046 100644
--- a/chrome/browser/chromeos/version_loader.cc
+++ b/chrome/browser/chromeos/version_loader.cc
@@ -135,7 +135,7 @@ void VersionLoader::Backend::GetVersion(VersionFormat format,
std::string contents;
const base::FilePath file_path(kPathVersion);
- if (file_util::ReadFileToString(file_path, &contents)) {
+ if (base::ReadFileToString(file_path, &contents)) {
*version = ParseVersion(
contents,
(format == VERSION_FULL) ? kFullVersionPrefix : kVersionPrefix);
@@ -159,7 +159,7 @@ void VersionLoader::Backend::GetFirmware(std::string* firmware) {
std::string contents;
const base::FilePath file_path(kPathFirmware);
- if (file_util::ReadFileToString(file_path, &contents)) {
+ if (base::ReadFileToString(file_path, &contents)) {
*firmware = ParseFirmware(contents);
}
}
diff --git a/chrome/browser/component_updater/default_component_installer.cc b/chrome/browser/component_updater/default_component_installer.cc
index da8dac9..56bede1 100644
--- a/chrome/browser/component_updater/default_component_installer.cc
+++ b/chrome/browser/component_updater/default_component_installer.cc
@@ -121,8 +121,8 @@ void DefaultComponentInstaller::StartRegistration(
if (found) {
current_version_ = latest_version;
- file_util::ReadFileToString(latest_dir.AppendASCII("manifest.fingerprint"),
- &current_fingerprint_);
+ base::ReadFileToString(latest_dir.AppendASCII("manifest.fingerprint"),
+ &current_fingerprint_);
}
// Remove older versions of the component. None should be in use during
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc
index c59c35c7..185c9e2 100644
--- a/chrome/browser/diagnostics/recon_diagnostics.cc
+++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -203,7 +203,7 @@ class JSONTest : public DiagnosticsTest {
}
// Being small enough, we can process it in-memory.
std::string json_data;
- if (!file_util::ReadFileToString(path_, &json_data)) {
+ if (!base::ReadFileToString(path_, &json_data)) {
RecordFailure(DIAG_RECON_UNABLE_TO_OPEN_FILE,
"Could not open file. Possibly locked by another process");
return true;
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 1bacb68..3839ca8 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -679,8 +679,7 @@ class DownloadTest : public InProcessBrowserTest {
int64 origin_file_size = 0;
EXPECT_TRUE(file_util::GetFileSize(origin_file, &origin_file_size));
std::string original_file_contents;
- EXPECT_TRUE(
- file_util::ReadFileToString(origin_file, &original_file_contents));
+ EXPECT_TRUE(base::ReadFileToString(origin_file, &original_file_contents));
EXPECT_TRUE(
VerifyFile(downloaded_file, original_file_contents, origin_file_size));
@@ -831,7 +830,7 @@ class DownloadTest : public InProcessBrowserTest {
const int64 file_size) {
std::string file_contents;
- bool read = file_util::ReadFileToString(path, &file_contents);
+ bool read = base::ReadFileToString(path, &file_contents);
EXPECT_TRUE(read) << "Failed reading file: " << path.value() << std::endl;
if (!read)
return false; // Couldn't read the file.
@@ -1475,7 +1474,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_IncognitoRegular) {
int64 origin_file_size = 0;
EXPECT_TRUE(file_util::GetFileSize(origin, &origin_file_size));
std::string original_contents;
- EXPECT_TRUE(file_util::ReadFileToString(origin, &original_contents));
+ EXPECT_TRUE(base::ReadFileToString(origin, &original_contents));
std::vector<DownloadItem*> download_items;
GetDownloads(browser(), &download_items);
@@ -2846,7 +2845,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_Renaming) {
"downloads/a_zip_file.zip"))));
ASSERT_TRUE(base::PathExists(origin_file));
std::string origin_contents;
- ASSERT_TRUE(file_util::ReadFileToString(origin_file, &origin_contents));
+ ASSERT_TRUE(base::ReadFileToString(origin_file, &origin_contents));
// Download the same url several times and expect that all downloaded files
// after the zero-th contain a deduplication counter.
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index f108f84..5f75f65 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -809,7 +809,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SavePageBrowserTest_NonMHTML) {
base::FilePath filename = download_dir.AppendASCII("dataurl.txt");
ASSERT_TRUE(base::PathExists(filename));
std::string contents;
- EXPECT_TRUE(file_util::ReadFileToString(filename, &contents));
+ EXPECT_TRUE(base::ReadFileToString(filename, &contents));
EXPECT_EQ("foo", contents);
}
diff --git a/chrome/browser/drive/fake_drive_service.cc b/chrome/browser/drive/fake_drive_service.cc
index 26cc58c..469ec40 100644
--- a/chrome/browser/drive/fake_drive_service.cc
+++ b/chrome/browser/drive/fake_drive_service.cc
@@ -1207,7 +1207,7 @@ CancelCallback FakeDriveService::ResumeUpload(
}
std::string content_data;
- if (!file_util::ReadFileToString(local_file_path, &content_data)) {
+ if (!base::ReadFileToString(local_file_path, &content_data)) {
session->uploaded_size = end_position;
completion_callback.Run(GDATA_FILE_ERROR, scoped_ptr<ResourceEntry>());
return CancelCallback();
diff --git a/chrome/browser/drive/fake_drive_service_unittest.cc b/chrome/browser/drive/fake_drive_service_unittest.cc
index 3c69648..f7d7fb4 100644
--- a/chrome/browser/drive/fake_drive_service_unittest.cc
+++ b/chrome/browser/drive/fake_drive_service_unittest.cc
@@ -903,7 +903,7 @@ TEST_F(FakeDriveServiceTest, DownloadFile_ExistingFile) {
EXPECT_EQ(HTTP_SUCCESS, error);
EXPECT_EQ(output_file_path, kOutputFilePath);
std::string content;
- ASSERT_TRUE(file_util::ReadFileToString(output_file_path, &content));
+ ASSERT_TRUE(base::ReadFileToString(output_file_path, &content));
// The content is "x"s of the file size specified in root_feed.json.
EXPECT_EQ("This is some test content.", content);
ASSERT_TRUE(!download_progress_values.empty());
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index 2c81f39..d102b0f 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -2197,8 +2197,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
" \"current\": \"complete\"}}]",
result_id)));
std::string disk_data;
- EXPECT_TRUE(file_util::ReadFileToString(item->GetTargetFilePath(),
- &disk_data));
+ EXPECT_TRUE(base::ReadFileToString(item->GetTargetFilePath(), &disk_data));
EXPECT_STREQ(kPayloadData, disk_data.c_str());
}
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
index f92d930..b8b6df1 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
@@ -195,7 +195,7 @@ TEST_F(NativeMessagingTest, SingleSendMessageWrite) {
std::string output;
base::TimeTicks start_time = base::TimeTicks::Now();
while (base::TimeTicks::Now() - start_time < TestTimeouts::action_timeout()) {
- ASSERT_TRUE(file_util::ReadFileToString(temp_output_file, &output));
+ ASSERT_TRUE(base::ReadFileToString(temp_output_file, &output));
if (!output.empty())
break;
base::PlatformThread::YieldCurrentThread();
diff --git a/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc b/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
index 2703bf9..a408e5b 100644
--- a/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
+++ b/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
@@ -17,7 +17,7 @@ void GetDBusMachineId(const extensions::api::DeviceId::IdCallback& callback) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
std::string result;
- if (!file_util::ReadFileToString(base::FilePath(kDBusFilename), &result)) {
+ if (!base::ReadFileToString(base::FilePath(kDBusFilename), &result)) {
DLOG(WARNING) << "Error reading dbus machine id file.";
result = "";
}
diff --git a/chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc b/chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc
index f4dffc3..51fc4b3 100644
--- a/chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc
+++ b/chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc
@@ -50,7 +50,7 @@ bool SyncSetupHelper::InitializeSync(Profile* profile) {
bool SyncSetupHelper::ReadPasswordFile(const base::FilePath& password_file) {
// TODO(dcheng): Convert format of config file to JSON.
std::string file_contents;
- bool success = file_util::ReadFileToString(password_file, &file_contents);
+ bool success = base::ReadFileToString(password_file, &file_contents);
EXPECT_TRUE(success)
<< "Password file \""
<< password_file.value() << "\" does not exist.";
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc
index 4bf9f52..049a5e7 100644
--- a/chrome/browser/extensions/component_loader_unittest.cc
+++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -88,7 +88,7 @@ class ComponentLoaderTest : public testing::Test {
.AppendASCII("1.0.0.0");
// Read in the extension manifest.
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
extension_path_.Append(kManifestFilename),
&manifest_contents_));
diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc
index 4d8b064..043fae2 100644
--- a/chrome/browser/extensions/convert_user_script.cc
+++ b/chrome/browser/extensions/convert_user_script.cc
@@ -34,7 +34,7 @@ scoped_refptr<Extension> ConvertUserScriptToExtension(
const base::FilePath& user_script_path, const GURL& original_url,
const base::FilePath& extensions_dir, string16* error) {
std::string content;
- if (!file_util::ReadFileToString(user_script_path, &content)) {
+ if (!base::ReadFileToString(user_script_path, &content)) {
*error = ASCIIToUTF16("Could not read source file.");
return NULL;
}
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc
index fe081da..fcf5948 100644
--- a/chrome/browser/extensions/convert_web_app_unittest.cc
+++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -51,7 +51,7 @@ WebApplicationInfo::IconInfo GetIconInfo(const GURL& url, int size) {
result.height = size;
std::string icon_data;
- if (!file_util::ReadFileToString(icon_file, &icon_data)) {
+ if (!base::ReadFileToString(icon_file, &icon_data)) {
ADD_FAILURE() << "Could not read test icon.";
return result;
}
diff --git a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
index 39ea0d6..3eadffa 100644
--- a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
+++ b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
@@ -70,7 +70,7 @@ gfx::Image LoadIcon(const std::string& filename) {
path = path.AppendASCII("extensions/api_test").AppendASCII(filename);
std::string file_contents;
- file_util::ReadFileToString(path, &file_contents);
+ base::ReadFileToString(path, &file_contents);
const unsigned char* data =
reinterpret_cast<const unsigned char*>(file_contents.data());
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 2ebf2dc..5e9ec68 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -220,8 +220,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionAsComponentWithManifest(
profile())->extension_service();
std::string manifest;
- if (!file_util::ReadFileToString(path.Append(manifest_relative_path),
- &manifest)) {
+ if (!base::ReadFileToString(path.Append(manifest_relative_path), &manifest)) {
return NULL;
}
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc
index 285aa5c..a50aff8 100644
--- a/chrome/browser/extensions/extension_creator.cc
+++ b/chrome/browser/extensions/extension_creator.cc
@@ -127,8 +127,7 @@ crypto::RSAPrivateKey* ExtensionCreator::ReadInputKey(const base::FilePath&
}
std::string private_key_contents;
- if (!file_util::ReadFileToString(private_key_path,
- &private_key_contents)) {
+ if (!base::ReadFileToString(private_key_path, &private_key_contents)) {
error_message_ =
l10n_util::GetStringUTF8(IDS_EXTENSION_PRIVATE_KEY_FAILED_TO_READ);
return NULL;
diff --git a/chrome/browser/extensions/extension_resource_request_policy_apitest.cc b/chrome/browser/extensions/extension_resource_request_policy_apitest.cc
index 44fd689..a2647a9 100644
--- a/chrome/browser/extensions/extension_resource_request_policy_apitest.cc
+++ b/chrome/browser/extensions/extension_resource_request_policy_apitest.cc
@@ -88,7 +88,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionResourceRequestPolicyTest, OriginPrivileges) {
// A data URL. Data URLs should always be able to load chrome-extension://
// resources.
std::string file_source;
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
test_data_dir_.AppendASCII("extension_resource_request_policy")
.AppendASCII("index.html"), &file_source));
ui_test_utils::NavigateToURL(browser(),
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 4ccc3c1..0d7d319 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -3499,7 +3499,7 @@ TEST_F(ExtensionServiceTest, ComponentExtensionWhitelisted) {
.AppendASCII(good0)
.AppendASCII("1.0.0.0");
std::string manifest;
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
path.Append(extensions::kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
service_->Init();
@@ -5050,7 +5050,7 @@ TEST_F(ExtensionServiceTest, ComponentExtensions) {
.AppendASCII("1.0.0.0");
std::string manifest;
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
path.Append(extensions::kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
@@ -5104,7 +5104,7 @@ TEST_F(ExtensionServiceTest, DeferredSyncStartupPreInstalledComponent) {
.AppendASCII(good0)
.AppendASCII("1.0.0.0");
std::string manifest;
- ASSERT_TRUE(file_util::ReadFileToString(
+ ASSERT_TRUE(base::ReadFileToString(
path.Append(extensions::kManifestFilename), &manifest));
service_->component_loader()->Add(manifest, path);
ASSERT_FALSE(service_->is_ready());
diff --git a/chrome/browser/extensions/gtalk_extension_browsertest.cc b/chrome/browser/extensions/gtalk_extension_browsertest.cc
index 42e4ecc..694765d 100644
--- a/chrome/browser/extensions/gtalk_extension_browsertest.cc
+++ b/chrome/browser/extensions/gtalk_extension_browsertest.cc
@@ -69,7 +69,7 @@ class GtalkExtensionTest : public ExtensionBrowserTest {
std::string ReadCurrentVersion() {
std::string response;
- EXPECT_TRUE(file_util::ReadFileToString(
+ EXPECT_TRUE(base::ReadFileToString(
test_data_dir_.AppendASCII("gtalk").AppendASCII("current_version"),
&response));
return response;
diff --git a/chrome/browser/extensions/image_loader.cc b/chrome/browser/extensions/image_loader.cc
index 439df3c2..2e2702e 100644
--- a/chrome/browser/extensions/image_loader.cc
+++ b/chrome/browser/extensions/image_loader.cc
@@ -83,7 +83,7 @@ void LoadImageOnBlockingPool(const ImageLoader::ImageRepresentation& image_info,
// Read the file from disk.
std::string file_contents;
base::FilePath path = image_info.resource.GetFilePath();
- if (path.empty() || !file_util::ReadFileToString(path, &file_contents)) {
+ if (path.empty() || !base::ReadFileToString(path, &file_contents)) {
return;
}
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index 1a98850..460fbdc 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -182,7 +182,7 @@ bool ReadImagesFromFile(const base::FilePath& extension_path,
base::FilePath path =
extension_path.AppendASCII(kDecodedImagesFilename);
std::string file_str;
- if (!file_util::ReadFileToString(path, &file_str))
+ if (!base::ReadFileToString(path, &file_str))
return false;
IPC::Message pickle(file_str.data(), file_str.size());
@@ -198,7 +198,7 @@ bool ReadMessageCatalogsFromFile(const base::FilePath& extension_path,
base::FilePath path = extension_path.AppendASCII(
kDecodedMessageCatalogsFilename);
std::string file_str;
- if (!file_util::ReadFileToString(path, &file_str))
+ if (!base::ReadFileToString(path, &file_str))
return false;
IPC::Message pickle(file_str.data(), file_str.size());
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index 64f892b..95b8f6a 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -203,7 +203,7 @@ static bool LoadScriptContent(UserScript::File* script_file,
return false;
}
} else {
- if (!file_util::ReadFileToString(path, &content)) {
+ if (!base::ReadFileToString(path, &content)) {
LOG(WARNING) << "Failed to load user script file: " << path.value();
return false;
}
diff --git a/chrome/browser/feedback/feedback_util.cc b/chrome/browser/feedback/feedback_util.cc
index 2c82b2c..0bbad4a 100644
--- a/chrome/browser/feedback/feedback_util.cc
+++ b/chrome/browser/feedback/feedback_util.cc
@@ -415,7 +415,7 @@ bool ZipString(const std::string& logs, std::string* compressed_logs) {
if (!zip::Zip(temp_path, zip_file, false))
return false;
- if (!file_util::ReadFileToString(zip_file, compressed_logs))
+ if (!base::ReadFileToString(zip_file, compressed_logs))
return false;
return true;
diff --git a/chrome/browser/google/google_update_settings_posix.cc b/chrome/browser/google/google_update_settings_posix.cc
index 8942024..4a69eab 100644
--- a/chrome/browser/google/google_update_settings_posix.cc
+++ b/chrome/browser/google/google_update_settings_posix.cc
@@ -27,7 +27,7 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
PathService::Get(chrome::DIR_USER_DATA, &consent_file);
consent_file = consent_file.Append(kConsentToSendStats);
std::string tmp_guid;
- bool consented = file_util::ReadFileToString(consent_file, &tmp_guid);
+ bool consented = base::ReadFileToString(consent_file, &tmp_guid);
if (consented)
google_update::posix_guid().assign(tmp_guid);
return consented;
diff --git a/chrome/browser/google/google_util_chromeos.cc b/chrome/browser/google/google_util_chromeos.cc
index 06232e4..41f1245 100644
--- a/chrome/browser/google/google_util_chromeos.cc
+++ b/chrome/browser/google/google_util_chromeos.cc
@@ -28,7 +28,7 @@ const base::FilePath::CharType kRLZBrandFilePath[] =
std::string ReadBrandFromFile() {
std::string brand;
base::FilePath brand_file_path(kRLZBrandFilePath);
- if (!file_util::ReadFileToString(brand_file_path, &brand))
+ if (!base::ReadFileToString(brand_file_path, &brand))
LOG(WARNING) << "Brand code file missing: " << brand_file_path.value();
TrimWhitespace(brand, TRIM_ALL, &brand);
return brand;
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;
}
diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc
index 59852a1..9e1f6867 100644
--- a/chrome/browser/history/expire_history_backend_unittest.cc
+++ b/chrome/browser/history/expire_history_backend_unittest.cc
@@ -391,7 +391,7 @@ TEST_F(ExpireHistoryTest, DeleteFaviconsIfPossible) {
bool ExpireHistoryTest::IsStringInFile(const base::FilePath& filename,
const char* str) {
std::string contents;
- EXPECT_TRUE(file_util::ReadFileToString(filename, &contents));
+ EXPECT_TRUE(base::ReadFileToString(filename, &contents));
return contents.find(str) != std::string::npos;
}
diff --git a/chrome/browser/history/history_unittest_base.cc b/chrome/browser/history/history_unittest_base.cc
index 576f5cc..353a432 100644
--- a/chrome/browser/history/history_unittest_base.cc
+++ b/chrome/browser/history/history_unittest_base.cc
@@ -19,7 +19,7 @@ HistoryUnitTestBase::~HistoryUnitTestBase() {
void HistoryUnitTestBase::ExecuteSQLScript(const base::FilePath& sql_path,
const base::FilePath& db_path) {
std::string sql;
- ASSERT_TRUE(file_util::ReadFileToString(sql_path, &sql));
+ ASSERT_TRUE(base::ReadFileToString(sql_path, &sql));
// Replace the 'last_visit_time', 'visit_time', 'time_slot' values in this
// SQL with the current time.
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc
index 0d94e14..1438524 100644
--- a/chrome/browser/history/url_index_private_data.cc
+++ b/chrome/browser/history/url_index_private_data.cc
@@ -401,7 +401,7 @@ scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile(
std::string data;
// If there is no cache file then simply give up. This will cause us to
// attempt to rebuild from the history database.
- if (!file_util::ReadFileToString(file_path, &data))
+ if (!base::ReadFileToString(file_path, &data))
return NULL;
scoped_refptr<URLIndexPrivateData> restored_data(new URLIndexPrivateData);
diff --git a/chrome/browser/icon_loader_linux.cc b/chrome/browser/icon_loader_linux.cc
index 4d400a9..2ee16ea 100644
--- a/chrome/browser/icon_loader_linux.cc
+++ b/chrome/browser/icon_loader_linux.cc
@@ -50,7 +50,7 @@ void IconLoader::ReadIcon() {
if (filename.Extension() != ".svg" &&
filename.Extension() != ".xpm") {
string icon_data;
- file_util::ReadFileToString(filename, &icon_data);
+ base::ReadFileToString(filename, &icon_data);
SkBitmap bitmap;
bool success = gfx::PNGCodec::Decode(
diff --git a/chrome/browser/media/webrtc_log_uploader.cc b/chrome/browser/media/webrtc_log_uploader.cc
index 268afd6..0ed5f1e 100644
--- a/chrome/browser/media/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc_log_uploader.cc
@@ -227,7 +227,7 @@ void WebRtcLogUploader::AddUploadedLogInfoToUploadListFile(
std::string contents;
if (base::PathExists(upload_list_path_)) {
- bool read_ok = file_util::ReadFileToString(upload_list_path_, &contents);
+ bool read_ok = base::ReadFileToString(upload_list_path_, &contents);
DPCHECK(read_ok);
// Limit the number of log entries to |kLogListLimitLines| - 1, to make room
diff --git a/chrome/browser/media/webrtc_log_uploader_unittest.cc b/chrome/browser/media/webrtc_log_uploader_unittest.cc
index 2c8ecc0..69d1b7f 100644
--- a/chrome/browser/media/webrtc_log_uploader_unittest.cc
+++ b/chrome/browser/media/webrtc_log_uploader_unittest.cc
@@ -23,7 +23,7 @@ class WebRtcLogUploaderTest : public testing::Test {
bool VerifyNumberOfLinesAndContentsOfLastLine(int expected_lines) {
std::string contents;
- int read = file_util::ReadFileToString(test_list_path_, &contents);
+ int read = base::ReadFileToString(test_list_path_, &contents);
EXPECT_GT(read, 0);
if (read <= 0)
return false;
diff --git a/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc b/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
index ea02812..8a4d0aa13 100644
--- a/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
+++ b/chrome/browser/media_galleries/fileapi/itunes_finder_win.cc
@@ -29,7 +29,7 @@ std::string GetPrefFileData() {
base::FilePath pref_file = appdata_dir.AppendASCII("Apple Computer")
.AppendASCII("iTunes")
.AppendASCII("iTunesPrefs.xml");
- file_util::ReadFileToString(pref_file, &xml_pref_data);
+ base::ReadFileToString(pref_file, &xml_pref_data);
}
return xml_pref_data;
}
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
index 91901bf..3a04fcb 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
@@ -154,7 +154,7 @@ class MediaFileValidatorTest : public InProcessBrowserTest {
const base::FilePath& source,
bool expected_result) {
std::string content;
- ASSERT_TRUE(file_util::ReadFileToString(source, &content));
+ ASSERT_TRUE(base::ReadFileToString(source, &content));
SetupOnFileThread(filename, content, expected_result);
}
diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
index 57ea926..d2ee13c 100644
--- a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
@@ -67,10 +67,10 @@ void SafePicasaAlbumsIndexer::ProcessFoldersBatch() {
folders_inis_.push_back(FolderINIContents());
bool ini_read =
- file_util::ReadFileToString(
+ base::ReadFileToString(
folder_path.AppendASCII(kPicasaINIFilename),
&folders_inis_.back().ini_contents) ||
- file_util::ReadFileToString(
+ base::ReadFileToString(
folder_path.AppendASCII(kPicasaINIFilenameLegacy),
&folders_inis_.back().ini_contents);
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
index 5704be1..f57ef18 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
@@ -568,7 +568,7 @@ TEST_F(MTPDeviceDelegateImplMacTest, TestDownload) {
DownloadFile(base::FilePath("/ic:id/filename"),
temp_dir_.path().Append("target")));
std::string contents;
- EXPECT_TRUE(file_util::ReadFileToString(temp_dir_.path().Append("target"),
- &contents));
+ EXPECT_TRUE(base::ReadFileToString(temp_dir_.path().Append("target"),
+ &contents));
EXPECT_EQ(kTestFileContents, contents);
}
diff --git a/chrome/browser/nacl_host/nacl_browser.cc b/chrome/browser/nacl_host/nacl_browser.cc
index 0f461b8..7606383 100644
--- a/chrome/browser/nacl_host/nacl_browser.cc
+++ b/chrome/browser/nacl_host/nacl_browser.cc
@@ -86,7 +86,7 @@ bool CheckEnvVar(const char* name, bool default_value) {
}
void ReadCache(const base::FilePath& filename, std::string* data) {
- if (!file_util::ReadFileToString(filename, data)) {
+ if (!base::ReadFileToString(filename, data)) {
// Zero-size data used as an in-band error code.
data->clear();
}
diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
index 02b4a8c..01cbb83 100644
--- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
+++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
@@ -55,12 +55,12 @@ class NaClGdbTest : public PPAPINaClNewlibTest {
RunTestViaHTTP(test_name);
env->UnSetVar("MOCK_NACL_GDB");
- EXPECT_TRUE(file_util::ReadFileToString(mock_nacl_gdb_file, &content));
+ EXPECT_TRUE(base::ReadFileToString(mock_nacl_gdb_file, &content));
EXPECT_STREQ("PASS", content.c_str());
EXPECT_TRUE(base::DeleteFile(mock_nacl_gdb_file, false));
content.clear();
- EXPECT_TRUE(file_util::ReadFileToString(script_, &content));
+ EXPECT_TRUE(base::ReadFileToString(script_, &content));
EXPECT_STREQ("PASS", content.c_str());
EXPECT_TRUE(base::DeleteFile(script_, false));
}
diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc
index 95fbfd3..464d0d1 100644
--- a/chrome/browser/net/crl_set_fetcher.cc
+++ b/chrome/browser/net/crl_set_fetcher.cc
@@ -74,7 +74,7 @@ void CRLSetFetcher::LoadFromDisk(base::FilePath path,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
std::string crl_set_bytes;
- if (!file_util::ReadFileToString(path, &crl_set_bytes))
+ if (!base::ReadFileToString(path, &crl_set_bytes))
return;
if (!net::CRLSet::Parse(crl_set_bytes, out_crl_set)) {
@@ -153,7 +153,7 @@ bool CRLSetFetcher::Install(const base::DictionaryValue& manifest,
return true;
std::string crl_set_bytes;
- if (!file_util::ReadFileToString(crl_set_file_path, &crl_set_bytes)) {
+ if (!base::ReadFileToString(crl_set_file_path, &crl_set_bytes)) {
LOG(WARNING) << "Failed to find crl-set file inside CRX";
return false;
}
diff --git a/chrome/browser/net/firefox_proxy_settings.cc b/chrome/browser/net/firefox_proxy_settings.cc
index aece777..9df1dda 100644
--- a/chrome/browser/net/firefox_proxy_settings.cc
+++ b/chrome/browser/net/firefox_proxy_settings.cc
@@ -69,7 +69,7 @@ bool ParsePrefFile(const base::FilePath& pref_file, DictionaryValue* prefs) {
// The string that is before a pref key.
const std::string kUserPrefString = "user_pref(\"";
std::string contents;
- if (!file_util::ReadFileToString(pref_file, &contents))
+ if (!base::ReadFileToString(pref_file, &contents))
return false;
std::vector<std::string> lines;
diff --git a/chrome/browser/net/proxy_browsertest.cc b/chrome/browser/net/proxy_browsertest.cc
index 1d84336..5897396 100644
--- a/chrome/browser/net/proxy_browsertest.cc
+++ b/chrome/browser/net/proxy_browsertest.cc
@@ -235,7 +235,7 @@ class DataProxyScriptBrowserTest : public InProcessBrowserTest {
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
std::string contents;
// Read in kPACScript contents.
- ASSERT_TRUE(file_util::ReadFileToString(ui_test_utils::GetTestFilePath(
+ ASSERT_TRUE(base::ReadFileToString(ui_test_utils::GetTestFilePath(
base::FilePath(base::FilePath::kCurrentDirectory),
base::FilePath(kPACScript)),
&contents));
diff --git a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc
index 686138a..987a51b 100644
--- a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc
+++ b/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc
@@ -53,8 +53,8 @@ class SQLiteServerBoundCertStoreTest : public testing::Test {
"unittest.originbound.key.der");
base::FilePath cert_path = net::GetTestCertsDirectory().AppendASCII(
"unittest.originbound.der");
- ASSERT_TRUE(file_util::ReadFileToString(key_path, key));
- ASSERT_TRUE(file_util::ReadFileToString(cert_path, cert));
+ ASSERT_TRUE(base::ReadFileToString(key_path, key));
+ ASSERT_TRUE(base::ReadFileToString(cert_path, cert));
}
static base::Time GetTestCertExpirationTime() {
diff --git a/chrome/browser/net/transport_security_persister.cc b/chrome/browser/net/transport_security_persister.cc
index 0b3fbfe..9b803a3 100644
--- a/chrome/browser/net/transport_security_persister.cc
+++ b/chrome/browser/net/transport_security_persister.cc
@@ -94,7 +94,7 @@ class TransportSecurityPersister::Loader {
void Load() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- state_valid_ = file_util::ReadFileToString(path_, &state_);
+ state_valid_ = base::ReadFileToString(path_, &state_);
}
void CompleteLoad() {
diff --git a/chrome/browser/net/transport_security_persister_unittest.cc b/chrome/browser/net/transport_security_persister_unittest.cc
index 2fdd63d..5455598 100644
--- a/chrome/browser/net/transport_security_persister_unittest.cc
+++ b/chrome/browser/net/transport_security_persister_unittest.cc
@@ -142,7 +142,7 @@ TEST_F(TransportSecurityPersisterTest, SerializeData3) {
// Read the data back.
std::string persisted;
- EXPECT_TRUE(file_util::ReadFileToString(path, &persisted));
+ EXPECT_TRUE(base::ReadFileToString(path, &persisted));
EXPECT_EQ(persisted, serialized);
bool dirty;
EXPECT_TRUE(persister_->LoadEntries(persisted, &dirty));
diff --git a/chrome/browser/page_cycler/page_cycler.cc b/chrome/browser/page_cycler/page_cycler.cc
index 51e1eb8..8a0e4d0 100644
--- a/chrome/browser/page_cycler/page_cycler.cc
+++ b/chrome/browser/page_cycler/page_cycler.cc
@@ -92,7 +92,7 @@ void PageCycler::ReadURLsOnBackgroundThread() {
std::vector<std::string> url_strings;
CHECK(base::PathExists(urls_file_)) << urls_file_.value();
- file_util::ReadFileToString(urls_file_, &file_contents);
+ base::ReadFileToString(urls_file_, &file_contents);
base::SplitStringAlongWhitespace(file_contents, &url_strings);
if (!url_strings.size()) {
diff --git a/chrome/browser/page_cycler/page_cycler_browsertest.cc b/chrome/browser/page_cycler/page_cycler_browsertest.cc
index b2cbe0e..5e6dbef 100644
--- a/chrome/browser/page_cycler/page_cycler_browsertest.cc
+++ b/chrome/browser/page_cycler/page_cycler_browsertest.cc
@@ -90,8 +90,7 @@ class PageCyclerBrowserTest : public content::NotificationObserver,
// Read the errors file, and generate a vector of error strings.
std::vector<std::string> GetErrorsFromFile() {
std::string error_file_contents;
- CHECK(file_util::ReadFileToString(errors_file_,
- &error_file_contents));
+ CHECK(base::ReadFileToString(errors_file_, &error_file_contents));
if (error_file_contents[error_file_contents.size() - 1] == '\n')
error_file_contents.resize(error_file_contents.size() - 1);
diff --git a/chrome/browser/page_cycler/page_cycler_unittest.cc b/chrome/browser/page_cycler/page_cycler_unittest.cc
index 2ef95fe..c82a266 100644
--- a/chrome/browser/page_cycler/page_cycler_unittest.cc
+++ b/chrome/browser/page_cycler/page_cycler_unittest.cc
@@ -257,10 +257,8 @@ TEST_F(PageCyclerTest, FailProvisionalLoads) {
std::string errors_output;
std::string errors_expected;
- ASSERT_TRUE(file_util::ReadFileToString(errors_file(),
- &errors_output));
- ASSERT_TRUE(file_util::ReadFileToString(errors_expected_file,
- &errors_expected));
+ ASSERT_TRUE(base::ReadFileToString(errors_file(), &errors_output));
+ ASSERT_TRUE(base::ReadFileToString(errors_expected_file, &errors_expected));
ASSERT_EQ(errors_output, errors_expected);
}
@@ -320,10 +318,8 @@ TEST_F(PageCyclerTest, KillBrowserAndAbort) {
std::string errors_output;
std::string errors_expected;
- ASSERT_TRUE(file_util::ReadFileToString(errors_file(),
- &errors_output));
- ASSERT_TRUE(file_util::ReadFileToString(errors_expected_file,
- &errors_expected));
+ ASSERT_TRUE(base::ReadFileToString(errors_file(), &errors_output));
+ ASSERT_TRUE(base::ReadFileToString(errors_expected_file, &errors_expected));
ASSERT_EQ(errors_output, errors_expected);
}
diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
index d129f0a..9fc7f7b 100644
--- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
+++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
@@ -273,8 +273,7 @@ IN_PROC_BROWSER_TEST_F(CloudPolicyTest, FetchPolicyWithRotatedKey) {
// Read the initial key.
std::string initial_key;
- ASSERT_TRUE(
- file_util::ReadFileToString(user_policy_key_file_, &initial_key));
+ ASSERT_TRUE(base::ReadFileToString(user_policy_key_file_, &initial_key));
PolicyMap empty;
EXPECT_TRUE(empty.Equals(policy_service->GetPolicies(
@@ -295,8 +294,7 @@ IN_PROC_BROWSER_TEST_F(CloudPolicyTest, FetchPolicyWithRotatedKey) {
// Verify that the key was rotated.
std::string rotated_key;
- ASSERT_TRUE(
- file_util::ReadFileToString(user_policy_key_file_, &rotated_key));
+ ASSERT_TRUE(base::ReadFileToString(user_policy_key_file_, &rotated_key));
EXPECT_NE(rotated_key, initial_key);
// Another refresh using the same key won't rotate it again.
@@ -308,8 +306,7 @@ IN_PROC_BROWSER_TEST_F(CloudPolicyTest, FetchPolicyWithRotatedKey) {
EXPECT_TRUE(expected.Equals(policy_service->GetPolicies(
PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))));
std::string current_key;
- ASSERT_TRUE(
- file_util::ReadFileToString(user_policy_key_file_, &current_key));
+ ASSERT_TRUE(base::ReadFileToString(user_policy_key_file_, &current_key));
EXPECT_EQ(rotated_key, current_key);
}
#endif
diff --git a/chrome/browser/policy/cloud/resource_cache.cc b/chrome/browser/policy/cloud/resource_cache.cc
index edea4af..8cea6ca 100644
--- a/chrome/browser/policy/cloud/resource_cache.cc
+++ b/chrome/browser/policy/cloud/resource_cache.cc
@@ -94,7 +94,7 @@ bool ResourceCache::Load(const std::string& key,
return false;
}
data->clear();
- return file_util::ReadFileToString(subkey_path, data);
+ return base::ReadFileToString(subkey_path, data);
}
void ResourceCache::LoadAllSubkeys(
@@ -116,7 +116,7 @@ void ResourceCache::LoadAllSubkeys(
// a base64-encoded string.
if (!file_util::IsLink(path) &&
Base64Decode(encoded_subkey, &subkey) &&
- file_util::ReadFileToString(path, &data)) {
+ base::ReadFileToString(path, &data)) {
(*contents)[subkey].swap(data);
}
}
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_store.cc b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
index 3fa53d5..3592b85 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_store.cc
@@ -56,7 +56,7 @@ policy::PolicyLoadResult LoadPolicyFromDisk(const base::FilePath& path) {
return result;
}
std::string data;
- if (!file_util::ReadFileToString(path, &data) ||
+ if (!base::ReadFileToString(path, &data) ||
!result.policy.ParseFromArray(data.c_str(), data.size())) {
LOG(WARNING) << "Failed to read or parse policy data from " << path.value();
result.status = policy::LOAD_RESULT_LOAD_ERROR;
diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc
index 689b40a..9d9abb4 100644
--- a/chrome/browser/policy/policy_prefs_browsertest.cc
+++ b/chrome/browser/policy/policy_prefs_browsertest.cc
@@ -197,7 +197,7 @@ class PolicyTestCases {
base::FilePath(FILE_PATH_LITERAL("policy")),
base::FilePath(FILE_PATH_LITERAL("policy_test_cases.json")));
std::string json;
- if (!file_util::ReadFileToString(path, &json)) {
+ if (!base::ReadFileToString(path, &json)) {
ADD_FAILURE();
return;
}
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
index cb64038..2248282 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service.cc
@@ -125,7 +125,7 @@ void CloudPrintProxyService::GetPrintersAvalibleForRegistration(
switches::kCloudPrintSetupProxy));
if (!list_path.empty()) {
std::string printers_json;
- file_util::ReadFileToString(list_path, &printers_json);
+ base::ReadFileToString(list_path, &printers_json);
scoped_ptr<Value> value(base::JSONReader::Read(printers_json));
base::ListValue* list = NULL;
if (value && value->GetAsList(&list) && list) {
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 49fd150..187dac6 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -671,7 +671,7 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context,
} else {
DLOG(WARNING) << " print data file too large to reserve space";
}
- if (file_util::ReadFileToString(path_to_file, &file_data)) {
+ if (base::ReadFileToString(path_to_file, &file_data)) {
data = base::RefCountedString::TakeString(&file_data);
}
}
diff --git a/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc b/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc
index d35d820..eab1423 100644
--- a/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc
+++ b/chrome/browser/printing/print_dialog_cloud_interative_uitest.cc
@@ -54,7 +54,7 @@ class TestData {
PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory);
base::FilePath test_file =
test_data_directory.AppendASCII("printing/cloud_print_uitest.html");
- file_util::ReadFileToString(test_file, &test_data_);
+ base::ReadFileToString(test_file, &test_data_);
}
return test_data_.c_str();
}
diff --git a/chrome/browser/printing/print_dialog_cloud_unittest.cc b/chrome/browser/printing/print_dialog_cloud_unittest.cc
index c08ffa8..09b7b95 100644
--- a/chrome/browser/printing/print_dialog_cloud_unittest.cc
+++ b/chrome/browser/printing/print_dialog_cloud_unittest.cc
@@ -61,7 +61,7 @@ char* GetTestData() {
static std::string sTestFileData;
if (sTestFileData.empty()) {
base::FilePath test_file = GetTestDataFileName();
- file_util::ReadFileToString(test_file, &sTestFileData);
+ base::ReadFileToString(test_file, &sTestFileData);
}
return &sTestFileData[0];
}
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 75b6ab2..7837f68 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -147,7 +147,7 @@ void ReadBitmap(const base::FilePath& image_path,
*out_image = NULL;
std::string image_data;
- if (!file_util::ReadFileToString(image_path, &image_data)) {
+ if (!base::ReadFileToString(image_path, &image_data)) {
LOG(ERROR) << "Failed to read PNG file from disk.";
return;
}
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
index 13e837d..e4802c3 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -806,7 +806,7 @@ TEST_F(ProfileShortcutManagerTest, UnbadgeProfileIconOnDeletion) {
// Default profile has unbadged icon to start.
std::string unbadged_icon_1;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &unbadged_icon_1));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &unbadged_icon_1));
// Creating a new profile adds a badge to both the new profile icon and the
// default profile icon. Since they use the same icon index, the icon files
@@ -814,9 +814,9 @@ TEST_F(ProfileShortcutManagerTest, UnbadgeProfileIconOnDeletion) {
CreateProfileWithShortcut(FROM_HERE, profile_2_name_, profile_2_path_);
std::string badged_icon_1;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &badged_icon_1));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &badged_icon_1));
std::string badged_icon_2;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_2, &badged_icon_2));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_2, &badged_icon_2));
EXPECT_NE(badged_icon_1, unbadged_icon_1);
EXPECT_EQ(badged_icon_1, badged_icon_2);
@@ -827,7 +827,7 @@ TEST_F(ProfileShortcutManagerTest, UnbadgeProfileIconOnDeletion) {
RunPendingTasks();
std::string unbadged_icon_2;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_2, &unbadged_icon_2));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_2, &unbadged_icon_2));
EXPECT_EQ(unbadged_icon_1, unbadged_icon_2);
}
@@ -841,9 +841,9 @@ TEST_F(ProfileShortcutManagerTest, ProfileIconOnAvatarChange) {
profile_info_cache_->GetIndexOfProfileWithPath(profile_1_path_);
std::string badged_icon_1;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &badged_icon_1));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &badged_icon_1));
std::string badged_icon_2;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_2, &badged_icon_2));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_2, &badged_icon_2));
// Profile 1 and 2 are created with the same icon.
EXPECT_EQ(badged_icon_1, badged_icon_2);
@@ -853,7 +853,7 @@ TEST_F(ProfileShortcutManagerTest, ProfileIconOnAvatarChange) {
RunPendingTasks();
std::string new_badged_icon_1;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &new_badged_icon_1));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &new_badged_icon_1));
EXPECT_NE(new_badged_icon_1, badged_icon_1);
// Ensure the new icon is not the unbadged icon.
@@ -861,7 +861,7 @@ TEST_F(ProfileShortcutManagerTest, ProfileIconOnAvatarChange) {
RunPendingTasks();
std::string unbadged_icon_1;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &unbadged_icon_1));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &unbadged_icon_1));
EXPECT_NE(unbadged_icon_1, new_badged_icon_1);
// Ensure the icon doesn't change on avatar change without 2 profiles.
@@ -869,6 +869,6 @@ TEST_F(ProfileShortcutManagerTest, ProfileIconOnAvatarChange) {
RunPendingTasks();
std::string unbadged_icon_1_a;
- EXPECT_TRUE(file_util::ReadFileToString(icon_path_1, &unbadged_icon_1_a));
+ EXPECT_TRUE(base::ReadFileToString(icon_path_1, &unbadged_icon_1_a));
EXPECT_EQ(unbadged_icon_1, unbadged_icon_1_a);
}
diff --git a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
index 39380db..8c7cf5d 100644
--- a/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
+++ b/chrome/browser/renderer_host/pepper/device_id_fetcher.cc
@@ -168,7 +168,7 @@ void DeviceIDFetcher::ComputeOnBlockingPool(const base::FilePath& profile_path,
// should just return that.
base::FilePath id_path = GetLegacyDeviceIDPath(profile_path);
if (base::PathExists(id_path)) {
- if (file_util::ReadFileToString(id_path, &id) && !id.empty()) {
+ if (base::ReadFileToString(id_path, &id) && !id.empty()) {
RunCallbackOnIOThread(id);
return;
}
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index 91cf222..9175ed1 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -118,7 +118,7 @@ ACTION_P(TrustSignature, certificate_file) {
// Add a certificate chain. Note that we add the certificate twice so that
// it appears as its own issuer.
std::string cert_data;
- ASSERT_TRUE(file_util::ReadFileToString(certificate_file, &cert_data));
+ ASSERT_TRUE(base::ReadFileToString(certificate_file, &cert_data));
ClientDownloadRequest_CertificateChain* chain =
arg1->add_certificate_chain();
chain->add_element()->set_certificate(cert_data);
@@ -239,8 +239,8 @@ class DownloadProtectionServiceTest : public testing::Test {
scoped_refptr<net::X509Certificate> ReadTestCertificate(
const std::string& filename) {
std::string cert_data;
- if (!file_util::ReadFileToString(testdata_path_.AppendASCII(filename),
- &cert_data)) {
+ if (!base::ReadFileToString(testdata_path_.AppendASCII(filename),
+ &cert_data)) {
return NULL;
}
net::CertificateList certs =
diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc
index 3905a3a..b602016 100644
--- a/chrome/browser/search_engines/template_url_parser_unittest.cc
+++ b/chrome/browser/search_engines/template_url_parser_unittest.cc
@@ -98,7 +98,7 @@ void TemplateURLParserTest::ParseFile(
ASSERT_TRUE(base::PathExists(full_path));
std::string contents;
- ASSERT_TRUE(file_util::ReadFileToString(full_path, &contents));
+ ASSERT_TRUE(base::ReadFileToString(full_path, &contents));
template_url_.reset(TemplateURLParser::Parse(NULL, false, contents.data(),
contents.length(), filter));
}
diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc
index 999197b..77d4bd8 100644
--- a/chrome/browser/sessions/better_session_restore_browsertest.cc
+++ b/chrome/browser/sessions/better_session_restore_browsertest.cc
@@ -127,7 +127,7 @@ class BetterSessionRestoreTest : public InProcessBrowserTest {
it != test_files.end(); ++it) {
base::FilePath path = test_file_dir.AppendASCII(*it);
std::string contents;
- CHECK(file_util::ReadFileToString(path, &contents));
+ CHECK(base::ReadFileToString(path, &contents));
g_file_contents.Get()["/" + test_path_ + *it] = contents;
net::URLRequestFilter::GetInstance()->AddUrlHandler(
GURL(fake_server_address_ + test_path_ + *it),
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index b19fd2e..8fc4cd6 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -623,7 +623,7 @@ bool GetExistingShortcutContents(base::Environment* env,
VLOG(1) << "Looking for desktop file in " << path.value();
if (base::PathExists(path)) {
VLOG(1) << "Found desktop file at " << path.value();
- return file_util::ReadFileToString(path, output);
+ return base::ReadFileToString(path, output);
}
}
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
index 4872b4e..29f89fc 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc
@@ -60,7 +60,7 @@ ChecksumStatus LoadFile(const base::FilePath& file_path, WordList& words) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
words.clear();
std::string contents;
- file_util::ReadFileToString(file_path, &contents);
+ base::ReadFileToString(file_path, &contents);
size_t pos = contents.rfind(CHECKSUM_PREFIX);
if (pos != std::string::npos) {
std::string checksum = contents.substr(pos + strlen(CHECKSUM_PREFIX));
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
index 72c73d6..8fc8849 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
@@ -305,7 +305,7 @@ TEST_F(SpellcheckCustomDictionaryTest, CorruptedWriteShouldBeRecovered) {
change.AddWord("baz");
UpdateDictionaryFile(change, path);
content.clear();
- file_util::ReadFileToString(path, &content);
+ base::ReadFileToString(path, &content);
content.append("corruption");
file_util::WriteFile(path, content.c_str(), content.length());
loaded_custom_words = LoadDictionaryFile(path);
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index c8226f3..9c5baca 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -669,7 +669,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestWSSClientCert) {
std::string pkcs12_data;
base::FilePath cert_path = net::GetTestCertsDirectory().Append(
FILE_PATH_LITERAL("websocket_client_cert.p12"));
- EXPECT_TRUE(file_util::ReadFileToString(cert_path, &pkcs12_data));
+ EXPECT_TRUE(base::ReadFileToString(cert_path, &pkcs12_data));
EXPECT_EQ(net::OK,
cert_db->ImportFromPKCS12(
crypt_module.get(), pkcs12_data, string16(), true, NULL));
diff --git a/chrome/browser/sxs_linux.cc b/chrome/browser/sxs_linux.cc
index daf6f93..4b34260 100644
--- a/chrome/browser/sxs_linux.cc
+++ b/chrome/browser/sxs_linux.cc
@@ -58,7 +58,7 @@ bool DoAddChannelMarkToUserDataDir(const base::FilePath& user_data_dir) {
// and legitimate that it doesn't exist, e.g. for new profile or for profile
// existing before channel marks have been introduced.
std::string channels_contents;
- if (file_util::ReadFileToString(channels_path, &channels_contents))
+ if (base::ReadFileToString(channels_path, &channels_contents))
base::SplitString(channels_contents, '\n', &user_data_dir_channels);
if (std::find(user_data_dir_channels.begin(),
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index b2d1a53..730002f 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -456,7 +456,7 @@ TEST_F(ProfileSyncServiceTest, TestStartupWithOldSyncData) {
// This will still exist, but the text should have changed.
ASSERT_TRUE(base::PathExists(sync_file2));
std::string file2text;
- ASSERT_TRUE(file_util::ReadFileToString(sync_file2, &file2text));
+ ASSERT_TRUE(base::ReadFileToString(sync_file2, &file2text));
ASSERT_NE(file2text.compare(nonsense2), 0);
}
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index d97f7b2..85e72c1 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -737,7 +737,7 @@ gfx::Image Create1xFaviconFromPNGFile(const std::string& path) {
full_path = full_path.AppendASCII("sync").AppendASCII(path);
std::string contents;
- file_util::ReadFileToString(full_path, &contents);
+ base::ReadFileToString(full_path, &contents);
return gfx::Image::CreateFrom1xPNGBytes(
reinterpret_cast<const unsigned char*>(contents.data()), contents.size());
}
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index ca447bc..a558afe 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -407,7 +407,7 @@ void SyncTest::ReadPasswordFile() {
LOG(FATAL) << "Can't run live server test without specifying --"
<< switches::kPasswordFileForTest << "=<filename>";
std::string file_contents;
- file_util::ReadFileToString(password_file_, &file_contents);
+ base::ReadFileToString(password_file_, &file_contents);
ASSERT_NE(file_contents, "") << "Password file \""
<< password_file_.value() << "\" does not exist.";
std::vector<std::string> tokens;
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc
index b31f9dd1..f5c267b 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc
@@ -813,8 +813,7 @@ void DriveFileSyncServiceFakeTest::TestGetRemoteVersions() {
ASSERT_EQ(SYNC_STATUS_OK, status);
std::string downloaded_content;
- EXPECT_TRUE(file_util::ReadFileToString(downloaded.path(),
- &downloaded_content));
+ EXPECT_TRUE(base::ReadFileToString(downloaded.path(), &downloaded_content));
EXPECT_EQ(content, downloaded_content);
}
diff --git a/chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc b/chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc
index 8e9ff62..82ae201 100644
--- a/chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc
+++ b/chrome/browser/sync_file_system/drive_backend/fake_drive_service_helper.cc
@@ -257,7 +257,7 @@ GDataErrorCode FakeDriveServiceHelper::ReadFile(
if (error != google_apis::HTTP_SUCCESS)
return error;
- return file_util::ReadFileToString(temp_file, file_content)
+ return base::ReadFileToString(temp_file, file_content)
? google_apis::HTTP_SUCCESS : google_apis::GDATA_FILE_ERROR;
}
diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
index c038156..3a2d71d8 100644
--- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
+++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
@@ -107,7 +107,7 @@ void OnCreateSnapshotFileAndVerifyData(
}
EXPECT_EQ(expected_data.size(), static_cast<size_t>(file_info.size));
std::string data;
- const bool read_status = file_util::ReadFileToString(platform_path, &data);
+ const bool read_status = base::ReadFileToString(platform_path, &data);
EXPECT_TRUE(read_status);
EXPECT_EQ(expected_data, data);
callback.Run(result);
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 93790d3..fc03e9e 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -172,7 +172,7 @@ class TestInterstitialPage : public content::InterstitialPageDelegate {
EXPECT_TRUE(r);
file_path = file_path.AppendASCII("focus");
file_path = file_path.AppendASCII(kTypicalPageName);
- r = file_util::ReadFileToString(file_path, &html_contents_);
+ r = base::ReadFileToString(file_path, &html_contents_);
EXPECT_TRUE(r);
interstitial_page_ = InterstitialPage::Create(
tab, new_navigation, url , this);
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm
index 2f93349..0546625 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm
@@ -58,7 +58,7 @@ gfx::Image LoadInstallPromptIcon() {
.AppendASCII("icon.png");
std::string file_contents;
- file_util::ReadFileToString(path, &file_contents);
+ base::ReadFileToString(path, &file_contents);
return gfx::Image::CreateFrom1xPNGBytes(
reinterpret_cast<const unsigned char*>(file_contents.c_str()),
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
index 8b87ef3..89bc47c 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
@@ -67,7 +67,7 @@ class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest {
path = path.AppendASCII("extensions").AppendASCII("icon1.png");
std::string file_contents;
- file_util::ReadFileToString(path, &file_contents);
+ base::ReadFileToString(path, &file_contents);
const unsigned char* data =
reinterpret_cast<const unsigned char*>(file_contents.data());
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index c4030c8..5ea3c32 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -404,7 +404,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindLongString) {
base::FilePath().AppendASCII("find_in_page"),
base::FilePath().AppendASCII("LongFind.txt"));
std::string query;
- file_util::ReadFileToString(path, &query);
+ base::ReadFileToString(path, &query);
std::wstring search_string = UTF8ToWide(query);
EXPECT_EQ(1,
FindInPageWchar(web_contents, search_string.c_str(),
@@ -467,7 +467,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindWholeFileContent) {
ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(path));
std::string query;
- file_util::ReadFileToString(path, &query);
+ base::ReadFileToString(path, &query);
std::wstring search_string = UTF8ToWide(query);
EXPECT_EQ(1,
FindInPageWchar(web_contents, search_string.c_str(),
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index febc1f1..cd9f7cf0 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -280,7 +280,7 @@ class ChromeOSTermsHandler
base::FilePath oem_eula_file_path;
if (net::FileURLToFilePath(GURL(customization->GetEULAPage(locale_)),
&oem_eula_file_path)) {
- if (!file_util::ReadFileToString(oem_eula_file_path, &contents_)) {
+ if (!base::ReadFileToString(oem_eula_file_path, &contents_)) {
contents_.clear();
}
}
@@ -293,11 +293,10 @@ class ChromeOSTermsHandler
void LoadEulaFileOnFileThread() {
std::string file_path =
base::StringPrintf(chrome::kEULAPathFormat, locale_.c_str());
- if (!file_util::ReadFileToString(base::FilePath(file_path), &contents_)) {
+ if (!base::ReadFileToString(base::FilePath(file_path), &contents_)) {
// No EULA for given language - try en-US as default.
file_path = base::StringPrintf(chrome::kEULAPathFormat, "en-US");
- if (!file_util::ReadFileToString(base::FilePath(file_path),
- &contents_)) {
+ if (!base::ReadFileToString(base::FilePath(file_path), &contents_)) {
// File with EULA not found, ResponseOnUIThread will load EULA from
// resources if contents_ is empty.
contents_.clear();
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
index d102d65..8bb3373 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
@@ -359,7 +359,7 @@ void NetInternalsTest::MessageHandler::GetNetLogLoggerLog(
net_log_logger.reset();
std::string log_contents;
- ASSERT_TRUE(file_util::ReadFileToString(temp_file, &log_contents));
+ ASSERT_TRUE(base::ReadFileToString(temp_file, &log_contents));
ASSERT_GT(log_contents.length(), 0u);
scoped_ptr<Value> log_contents_value(new base::StringValue(log_contents));
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index b34ff7a..8899045 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -272,7 +272,7 @@ CancelableTaskTracker::TaskId FileAccessProvider::StartWrite(
void FileAccessProvider::DoRead(const base::FilePath& path,
int* saved_errno,
std::string* data) {
- bool success = file_util::ReadFileToString(path, data);
+ bool success = base::ReadFileToString(path, data);
*saved_errno = success ? 0 : errno;
}
diff --git a/chrome/browser/ui/webui/profiler_ui.cc b/chrome/browser/ui/webui/profiler_ui.cc
index c3d26b4..494f628 100644
--- a/chrome/browser/ui/webui/profiler_ui.cc
+++ b/chrome/browser/ui/webui/profiler_ui.cc
@@ -84,7 +84,7 @@ class ProfilerWebUIDataSource : public content::URLDataSource {
// Read the file synchronously and send it as the response.
base::ThreadRestrictions::ScopedAllowIO allow;
std::string file_contents;
- if (!file_util::ReadFileToString(file_path, &file_contents))
+ if (!base::ReadFileToString(file_path, &file_contents))
LOG(ERROR) << "Couldn't read file: " << file_path.value();
scoped_refptr<base::RefCountedString> response =
new base::RefCountedString();
diff --git a/chrome/browser/upload_list.cc b/chrome/browser/upload_list.cc
index 3f618aa..3fe0744 100644
--- a/chrome/browser/upload_list.cc
+++ b/chrome/browser/upload_list.cc
@@ -51,7 +51,7 @@ void UploadList::LoadUploadListAndInformDelegateOfCompletion() {
void UploadList::LoadUploadList() {
if (base::PathExists(upload_log_path_)) {
std::string contents;
- file_util::ReadFileToString(upload_log_path_, &contents);
+ base::ReadFileToString(upload_log_path_, &contents);
std::vector<std::string> log_entries;
base::SplitStringAlongWhitespace(contents, &log_entries);
ParseLogEntries(log_entries);
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc
index a8774b5..1922445 100644
--- a/chrome/browser/user_style_sheet_watcher.cc
+++ b/chrome/browser/user_style_sheet_watcher.cc
@@ -122,7 +122,7 @@ void UserStyleSheetLoader::LoadStyleSheet(
file_util::WriteFile(style_sheet_file, "", 0);
std::string css;
- bool rv = file_util::ReadFileToString(style_sheet_file, &css);
+ bool rv = base::ReadFileToString(style_sheet_file, &css);
GURL style_sheet_url;
if (rv && !css.empty()) {
std::string css_base64;