Add version information to install plan and GetStatus.
As per the TODO this information is useful for debugging and testing
changes i.e. I'd like to know what version I'm updating to. GetStatus
already supports getting this version but we never populate the field.
BUG=chromium:264505
TEST=Unittests + ran update_engine_client -update which uses GetStatus
to communicate status.
Change-Id: I5332e2f206d92aedba509cd5469e9610c88bcd03
Reviewed-on: https://gerrit.chromium.org/gerrit/63675
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/update_attempter.cc b/update_attempter.cc
index 0f8abfb..5755fb4 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -788,8 +788,7 @@
CHECK(action == response_handler_action_.get());
const InstallPlan& plan = response_handler_action_->install_plan();
last_checked_time_ = time(NULL);
- // TODO(adlr): put version in InstallPlan
- new_version_ = "0.0.0.0";
+ new_version_ = plan.version;
new_payload_size_ = plan.payload_size;
SetupDownload();
SetupCpuSharesManagement();