Split GetECVersion to allow saner unit testing.
Previously, GetECVersion() accepted a (const char *) parameter that
was used solely as a flag meaning "unit test this function with
the specified data in place of mosys output". This change splits
the function into GetECVersion() and ParseECVersion(), and only unit
tests the second part.
BUG=None
TEST=unit tests
Change-Id: Ic48d18c02bd1924f49a0d8f0034ccb1ae8b5231e
Reviewed-on: https://chromium-review.googlesource.com/174883
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 9a729f0..ea25c74 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -81,7 +81,7 @@
hwid_ = utils::GetHardwareClass();
if (CollectECFWVersions()) {
fw_version_ = utils::GetFirmwareVersion();
- ec_version_ = utils::GetECVersion(NULL);
+ ec_version_ = utils::GetECVersion();
}
if (current_channel_ == target_channel_) {