update_engine: UM: Change policy argument from const ref to value.
It turns out that passing an argument by reference to UpdateCanStart via
UpdateManager::AsyncPolicyRequest is a pain. Furthermore, given that the
policy is async by definition, it makes little sense to hand it a const
reference argument. This changes the said argument to be passed by
value.
BUG=chromium:396148
TEST=Unit tests.
Change-Id: I45a8141b389c173347f3a6b7dc03ffe46cb32228
Reviewed-on: https://chromium-review.googlesource.com/219694
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/update_manager/policy.h b/update_manager/policy.h
index 40586c3..a009c68 100644
--- a/update_manager/policy.h
+++ b/update_manager/policy.h
@@ -219,7 +219,7 @@
State* state,
std::string* error,
UpdateDownloadParams* result,
- const UpdateState& update_state) const = 0;
+ UpdateState update_state) const = 0;
// Checks whether downloading of an update is allowed; currently, this checks
// whether the network connection type is suitable for updating over. May