Switch FileWriter::Write to boolean result code.

FileWriter::Write returned either the number of bytes written, or a negative
error code. No clients were doing anything with the result other than checking
for success or failure, and many clients were considering any non-zero result
success.

So, I changed the API to return less information, but just the information the
clients needed. Success or failure.

BUG=chromium-os:8521
TEST=Unittests

Change-Id: I51513d6aa7b704dc27fb90d5fae4dc7118a3f86c
Reviewed-on: https://gerrit.chromium.org/gerrit/11532
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
diff --git a/download_action.cc b/download_action.cc
index 989625d..b08c1fc 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -96,7 +96,7 @@
   bytes_received_ += length;
   if (delegate_)
     delegate_->BytesReceived(bytes_received_, install_plan_.size);
-  if (writer_ && writer_->Write(bytes, length) < 0) {
+  if (writer_ && !writer_->Write(bytes, length)) {
     LOG(ERROR) << "Write error -- terminating processing.";
     // Don't tell the action processor that the action is complete until we get
     // the TransferTerminated callback. Otherwise, this and the HTTP fetcher