UpdateManager: rename UpdateCurrentConnectionAllowed into UpdateDownloadAllowed.
The signifies the *functional* nature of this policy request, instead of
dwelling on the low-level information it is evaluating.
BUG=chromium:389677
TEST=Unit tests.
Change-Id: I684ea13d4e89554b6a4d596666c18e2dbd609991
Reviewed-on: https://chromium-review.googlesource.com/206903
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/update_manager/policy.h b/update_manager/policy.h
index 1c9e876..42a10bf 100644
--- a/update_manager/policy.h
+++ b/update_manager/policy.h
@@ -131,9 +131,9 @@
if (reinterpret_cast<typeof(&Policy::UpdateCanStart)>(
policy_method) == &Policy::UpdateCanStart)
return class_name + "UpdateCanStart";
- if (reinterpret_cast<typeof(&Policy::UpdateCurrentConnectionAllowed)>(
- policy_method) == &Policy::UpdateCurrentConnectionAllowed)
- return class_name + "UpdateCurrentConnectionAllowed";
+ if (reinterpret_cast<typeof(&Policy::UpdateDownloadAllowed)>(
+ policy_method) == &Policy::UpdateDownloadAllowed)
+ return class_name + "UpdateDownloadAllowed";
NOTREACHED();
return class_name + "(unknown)";
@@ -168,12 +168,13 @@
const bool interactive,
const UpdateState& update_state) const = 0;
- // Checks whether updating is allowed over the current network connection
- // Consults the shill provider as well as the device policy (if available).
+ // Checks whether downloading of an update is allowed; currently, this checks
+ // whether the network connection type is suitable for updating over. May
+ // consult the shill provider as well as the device policy (if available).
// Returns |EvalStatus::kSucceeded|, setting |result| according to whether or
// not the current connection can be used; on failure, returns
// |EvalStatus::kFailed| and sets |error| accordingly.
- virtual EvalStatus UpdateCurrentConnectionAllowed(
+ virtual EvalStatus UpdateDownloadAllowed(
EvaluationContext* ec,
State* state,
std::string* error,