UM: Make the evaluation timeout configurable.

This allows the client to construct the UpdateManager with a custom
evaluation timeout for sync policy requests, which is in turn being
passed to each EvaluationContext instance used for sync policy
evaluation.

BUG=chromium:363790
TEST=Unit tests.

Change-Id: I5a6ec02a3ca2a2c611276eacbcda6aac8304e929
Reviewed-on: https://chromium-review.googlesource.com/204687
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/update_manager/evaluation_context.h b/update_manager/evaluation_context.h
index 97e5b97..30f9bd5 100644
--- a/update_manager/evaluation_context.h
+++ b/update_manager/evaluation_context.h
@@ -51,7 +51,8 @@
     public base::RefCounted<EvaluationContext>,
     private BaseVariable::ObserverInterface {
  public:
-  explicit EvaluationContext(chromeos_update_engine::ClockInterface* clock);
+  explicit EvaluationContext(chromeos_update_engine::ClockInterface* clock,
+                             base::TimeDelta evaluation_timeout);
   ~EvaluationContext();
 
   // Returns a pointer to the value returned by the passed variable |var|. The
@@ -138,8 +139,7 @@
 
   // The timeout of an evaluation, used to compute the RemainingTime() of an
   // evaluation.
-  // TODO(deymo): Receive the timeout from the UpdateManager. crbug.com/363790
-  base::TimeDelta evaluation_timeout_ = base::TimeDelta::FromSeconds(5);
+  const base::TimeDelta evaluation_timeout_;
 
   // The timestamp in the ClockInterface::GetMonotonicTime() scale at which the
   // current evaluation should finish. This is used to compute the