summaryrefslogtreecommitdiff
path: root/update_manager/update_manager_unittest.cc
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2014-10-08 08:09:09 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-01 07:59:14 +0000
commit14a9e70709b4cda5afc97ac6219bc660810b2077 (patch)
treeb3add05bc5cc9f810bd3a54656c138c3ea56d34a /update_manager/update_manager_unittest.cc
parentb2f9919a0e4a77dd885625cb52ff7322974bd338 (diff)
update_engine: UM: Properly handle update download deterrents.
The UpdateCanStart policy request needs to satisfy two related requirements: * It must allow the caller to proceed with the update even if some forms of download are not allowed (for example, HTTP/HTTPS download blocked due to scattering) but other are allowed (for example, P2P). * It needs to assess all the input provided and, upon returning successfully, convey any new values that pertain to downloading of the update payload and that need to be persisted (such as the download URL, backoff and scattering values, and so on). The caller in turn is assured that, having successfully returned, the policy has indeed considered all state and it is safe to clear parts of it (such as the download error history). This change ensures that the policy suppresses scattering and backoff decisions if P2P download is allowed. This only suppresses the final decision, but otherwise still returns whatever URL index and error count that were inferred. It further adjusts the way in which various download deterrents (check due, scattering, backoff) are handled, deferring responses to the very end of the evaluation and thus returning a complete result. BUG=chromium:384087 TEST=Unit tests. Change-Id: Ie95976295c0cd635e2a10912308b8756a677682f Reviewed-on: https://chromium-review.googlesource.com/222263 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
Diffstat (limited to 'update_manager/update_manager_unittest.cc')
0 files changed, 0 insertions, 0 deletions