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_unittest.cc b/update_manager/evaluation_context_unittest.cc
index 33d91a4..9c51022 100644
--- a/update_manager/evaluation_context_unittest.cc
+++ b/update_manager/evaluation_context_unittest.cc
@@ -50,7 +50,7 @@
fake_clock_.SetMonotonicTime(Time::FromInternalValue(12345678L));
// Mar 2, 2006 1:23:45 UTC is 1141262625 since the Unix Epoch.
fake_clock_.SetWallclockTime(Time::FromTimeT(1141262625));
- eval_ctx_ = new EvaluationContext(&fake_clock_);
+ eval_ctx_ = new EvaluationContext(&fake_clock_, default_timeout_);
}
virtual void TearDown() {
@@ -62,8 +62,6 @@
EXPECT_TRUE(fake_poll_var_.observer_list_.empty());
}
- // TODO(deymo): Update the default timeout to the one passed on construction.
- // See crbug.com/363790
base::TimeDelta default_timeout_ = base::TimeDelta::FromSeconds(5);
FakeClock fake_clock_;