AU: Always run setgoodkernel, unless we abort within 45 seconds of launch.

This addresses a bug in the updater. Previously, we ran setgoodkernel
within 45 seconds of boot, unless an update was running or completed
successfully (thus requiring us to reboot). This change keeps the
indended behavior of running within 45 seconds of boot, but prevents
updating from interfering.

BUG=chromium-os:14280
TEST=tested on device

Change-Id: Ib6a8978835a68440d671785577abccdc5856ef1d

Review URL: http://codereview.chromium.org/6881037
diff --git a/main.cc b/main.cc
index 48ea9f1..769850c 100755
--- a/main.cc
+++ b/main.cc
@@ -41,21 +41,7 @@
 
 gboolean UpdateBootFlags(void* arg) {
   UpdateAttempter* attempter = reinterpret_cast<UpdateAttempter*>(arg);
-  if (attempter->status() == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
-    // Don't update the flags if there's an update that's just been applied and
-    // we're waiting for reboot because we may end up reverting the update.
-    return FALSE;  // Don't call this callback again.
-  }
-  if (attempter->status() != UPDATE_STATUS_IDLE) {
-    // To avoid races (e.g., setting a good kernel right after post-install but
-    // before the status changes), update the boot flag only if the attempter is
-    // idle.
-    return TRUE;  // Call this callback again.
-  }
-  // This is purely best effort. Failures should be logged by Subprocess.
-  int unused = 0;
-  vector<string> cmd(1, "/usr/sbin/chromeos-setgoodkernel");
-  Subprocess::SynchronousExec(cmd, &unused);
+  attempter->UpdateBootFlags();
   return FALSE;  // Don't call this callback again
 }