summaryrefslogtreecommitdiff
path: root/update_manager/update_manager_unittest.cc
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2014-10-22 14:38:25 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-04 07:03:35 +0000
commit78ecbfc254c574e52cfe63310a801381a0035c43 (patch)
treeaa127de99e696edebbf154807afde6e44a8cdb7c /update_manager/update_manager_unittest.cc
parent74b5f55e6ff608857664fe151f54d78bfe0b75bb (diff)
update_engine: UM: Separate global P2P usage from payload-specific attributes.
This change is needed for two reasons: (a) The decision regarding the global P2P enabled state and those pertaining to whether individual payloads may be downloaded and/or shared via P2P have distinct and not necessarily nested lifespans. (b) Some parts of the update engine are concerned with the former and some with the latter, and so we need separate entry points in the Update Manager to accommodate that. This also introduces two Omaha-derived values, denoting whether P2P downloading and/or sharing should be disabled for the current payload, into the UpdateCanStart policy. BUG=chromium:425233 TEST=Unit tests. Change-Id: I0ba0090bd4c5ceb0c812ea218b070945083abd95 Reviewed-on: https://chromium-review.googlesource.com/225150 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org>
Diffstat (limited to 'update_manager/update_manager_unittest.cc')
-rw-r--r--update_manager/update_manager_unittest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index 42edc40d..3534cfa2 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -170,6 +170,8 @@ TEST_F(UmUpdateManagerTest, PolicyRequestCallUpdateCanStart) {
update_state.failures_last_updated = Time();
update_state.download_urls = vector<string>{"http://fake/url/"};
update_state.download_errors_max = 10;
+ update_state.p2p_downloading_disabled = false;
+ update_state.p2p_sharing_disabled = false;
update_state.p2p_num_attempts = 0;
update_state.p2p_first_attempted = Time();
update_state.last_download_url_idx = -1;