Don't drop cache.

It's possible (probable?) that the sync and cache drop operations part way
through the update process are causing UI jank. However, these operations were
added to work around an apparent kernel bug early in our development. This
bug may or may not have been fixed.

The sync operation here will be re-added during the postinst immediately
before we active the new partition in firmware.

If the kernel bug re-appears, we'll re-add the operations needed to
work around it in postinst so that we have the maximum flexibility.

BUG=chromium-os:27957
TEST=image_to_live.sh.

Change-Id: I152e494c07d3dc9a8e87ea377911d740511c5a30
Reviewed-on: https://gerrit.chromium.org/gerrit/19632
Reviewed-by: Don Garrett <dgarrett@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 b08c1fc..f84af33 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -107,22 +107,6 @@
   }
 }
 
-namespace {
-void FlushLinuxCaches() {
-  vector<string> command;
-  command.push_back("/bin/sync");
-  int rc;
-  LOG(INFO) << "FlushLinuxCaches-sync...";
-  Subprocess::SynchronousExec(command, &rc, NULL);
-  LOG(INFO) << "FlushLinuxCaches-drop_caches...";
-
-  const char* const drop_cmd = "3\n";
-  utils::WriteFile("/proc/sys/vm/drop_caches", drop_cmd, strlen(drop_cmd));
-
-  LOG(INFO) << "FlushLinuxCaches done.";
-}
-}
-
 void DownloadAction::TransferComplete(HttpFetcher *fetcher, bool successful) {
   if (writer_) {
     LOG_IF(WARNING, writer_->Close() != 0) << "Error closing the writer.";
@@ -150,8 +134,6 @@
     }
   }
 
-  FlushLinuxCaches();
-
   // Write the path to the output pipe if we're successful.
   if (code == kActionCodeSuccess && HasOutputPipe())
     SetOutputObject(install_plan_);