Load the and store rollback version into the correct variable.
Somehow missed this and added unittest to help never have this issue again.
In this CL I also got rid of the powerwash_prefs_ logic in GetPersistedValue
because it was just useless noise in my prev CL that isn't used anymore.
BUG=chromium:285381
TEST=unittests that actually catch error.
Change-Id: I4ed680c5b5c2e37549d58aa0a7c0d35a62623fe7
Reviewed-on: https://chromium-review.googlesource.com/168073
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/omaha_response_handler_action.cc b/omaha_response_handler_action.cc
index 8e77afa..3cf78d3 100644
--- a/omaha_response_handler_action.cc
+++ b/omaha_response_handler_action.cc
@@ -50,9 +50,12 @@
// Note: policy decision to not update to a version we rolled back from.
string rollback_version =
system_state_->payload_state()->GetRollbackVersion();
- if (!rollback_version.empty() && rollback_version == response.version) {
- LOG(INFO) << "Received version that we rolled back from. Aborting.";
- return;
+ if(!rollback_version.empty()) {
+ LOG(INFO) << "Detected previous rollback from version " << rollback_version;
+ if(rollback_version == response.version) {
+ LOG(INFO) << "Received version that we rolled back from. Aborting.";
+ return;
+ }
}
// All decisions as to which URL should be used have already been done. So,