summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-06 20:42:30 +0000
commite5c2a22eb106e0fef92bbf80ac8bf2429980cc4e (patch)
tree480bf91e3cf64d69f837a2f22f8fc868bf17dfdc /cloud_print
parent06b1d42b0ceadd4a70b7462c5c7e6adeb5a18ca4 (diff)
downloadchromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.zip
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.gz
chromium_src-e5c2a22eb106e0fef92bbf80ac8bf2429980cc4e.tar.bz2
Move WriteFile and WriteFileDescriptor from file_util to base namespace.
R=viettrungluu@chromium.org TBR=viettrungluu Review URL: https://codereview.chromium.org/184563006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/gcp20/prototype/print_job_handler.cc8
-rw-r--r--cloud_print/gcp20/prototype/printer_state.cc2
-rw-r--r--cloud_print/service/win/chrome_launcher.cc6
-rw-r--r--cloud_print/service/win/cloud_print_service.cc2
-rw-r--r--cloud_print/service/win/cloud_print_service_config.cc2
5 files changed, 10 insertions, 10 deletions
diff --git a/cloud_print/gcp20/prototype/print_job_handler.cc b/cloud_print/gcp20/prototype/print_job_handler.cc
index 48ba76e..e275266 100644
--- a/cloud_print/gcp20/prototype/print_job_handler.cc
+++ b/cloud_print/gcp20/prototype/print_job_handler.cc
@@ -235,15 +235,15 @@ bool PrintJobHandler::SavePrintJob(const std::string& content,
return false;
}
- int written = file_util::WriteFile(directory.AppendASCII("ticket.xml"),
- ticket.data(),
- static_cast<int>(ticket.size()));
+ int written = base::WriteFile(directory.AppendASCII("ticket.xml"),
+ ticket.data(),
+ static_cast<int>(ticket.size()));
if (static_cast<size_t>(written) != ticket.size()) {
LOG(WARNING) << "Cannot save ticket.";
return false;
}
- written = file_util::WriteFile(
+ written = base::WriteFile(
directory.AppendASCII("data." + file_extension),
content.data(), static_cast<int>(content.size()));
if (static_cast<size_t>(written) != content.size()) {
diff --git a/cloud_print/gcp20/prototype/printer_state.cc b/cloud_print/gcp20/prototype/printer_state.cc
index 0e12eee..17ccb6c 100644
--- a/cloud_print/gcp20/prototype/printer_state.cc
+++ b/cloud_print/gcp20/prototype/printer_state.cc
@@ -75,7 +75,7 @@ bool SaveToFile(const base::FilePath& path, const PrinterState& state) {
base::JSONWriter::OPTIONS_PRETTY_PRINT,
&json_str);
int size = base::checked_cast<int>(json_str.size());
- return (file_util::WriteFile(path, json_str.data(), size) == size);
+ return (base::WriteFile(path, json_str.data(), size) == size);
}
bool LoadFromFile(const base::FilePath& path, PrinterState* state) {
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index f6b863e..f0cac5e 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -292,9 +292,9 @@ std::string ChromeLauncher::CreateServiceStateFile(
printer_list.AppendStrings(printers);
std::string printers_json;
base::JSONWriter::Write(&printer_list, &printers_json);
- size_t written = file_util::WriteFile(printers_file,
- printers_json.c_str(),
- printers_json.size());
+ size_t written = base::WriteFile(printers_file,
+ printers_json.c_str(),
+ printers_json.size());
if (written != printers_json.size()) {
LOG(ERROR) << "Can't write file.";
return result;
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index e0998f0c..6f58095 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -351,7 +351,7 @@ class CloudPrintServiceModule
}
if (new_contents != contents) {
- size_t written = file_util::WriteFile(file, new_contents.c_str(),
+ size_t written = base::WriteFile(file, new_contents.c_str(),
new_contents.size());
if (written != new_contents.size()) {
return ReportError(cloud_print::GetLastHResult(),
diff --git a/cloud_print/service/win/cloud_print_service_config.cc b/cloud_print/service/win/cloud_print_service_config.cc
index 9556826..70f50c7 100644
--- a/cloud_print/service/win/cloud_print_service_config.cc
+++ b/cloud_print/service/win/cloud_print_service_config.cc
@@ -389,7 +389,7 @@ void SetupDialog::Install(const base::string16& user,
if (contents.empty())
return ShowError(IDS_ERROR_FAILED_CREATE_CONFIG);
- size_t written = file_util::WriteFile(file, contents.c_str(),
+ size_t written = base::WriteFile(file, contents.c_str(),
contents.size());
if (written != contents.size()) {
DWORD last_error = GetLastError();