update_engine: UM: Add check for monotonic time elapsed.

This forks the former EvaluationStatus::IsTimeGreaterThan() into two
separate variants, checking either the wallclock or monotonic current
time against a corresponding timestamp. This is needed for policies that
require resilience against wallclock time volatility.

BUG=chromium:394778
TEST=Unit tests.

Change-Id: I9ecd20cc87a3a520e119f157e55ae4f54104a506
Reviewed-on: https://chromium-review.googlesource.com/209487
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
diff --git a/update_manager/chromeos_policy.h b/update_manager/chromeos_policy.h
index c954f9d..889adbd 100644
--- a/update_manager/chromeos_policy.h
+++ b/update_manager/chromeos_policy.h
@@ -95,6 +95,10 @@
 
   // A private policy implementation returning the wallclock timestamp when
   // the next update check should happen.
+  // TODO(garnold) We should probably change that to infer a monotonic
+  // timestamp, which will make the update check intervals more resilient to
+  // clock skews. Might require switching some of the variables exported by the
+  // UpdaterProvider to report monotonic time, as well.
   EvalStatus NextUpdateCheckTime(EvaluationContext* ec, State* state,
                                  std::string* error,
                                  base::Time* next_update_check) const;