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

Unified Diff: chromeos/process_proxy/process_proxy.cc

Issue 614893004: Refactor AppendToFile and WriteFileDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/process_proxy/process_proxy.cc
diff --git a/chromeos/process_proxy/process_proxy.cc b/chromeos/process_proxy/process_proxy.cc
index 881ea5abdfd276fdb603d61ac3781ce7e78d7b4c..b1021f4eeefd322e531fc78c273ee3f8e89b718f 100644
--- a/chromeos/process_proxy/process_proxy.cc
+++ b/chromeos/process_proxy/process_proxy.cc
@@ -160,10 +160,8 @@ bool ProcessProxy::Write(const std::string& text) {
// We don't want to write '\0' to the pipe.
size_t data_size = text.length() * sizeof(*text.c_str());
- int bytes_written =
- base::WriteFileDescriptor(pt_pair_[PT_MASTER_FD],
- text.c_str(), data_size);
- return (bytes_written == static_cast<int>(data_size));
+ return base::WriteFileDescriptor(
+ pt_pair_[PT_MASTER_FD], text.c_str(), data_size);
}
bool ProcessProxy::OnTerminalResize(int width, int height) {
« no previous file with comments | « chromeos/process_proxy/process_output_watcher_unittest.cc ('k') | components/metrics/serialization/serialization_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698