Set default updater URL and version per platform.
Chrome OS and Brillo devices require different production update URL
and updater string ID sent to Omaha. This patch moves these constants
to a platform-dependent file with the definition of the constants.
Bug: brillo:587,brillo:588
Test: FEATURES=test emerge-link update_engine; `mma`; deployed on a dragonboard.
Change-Id: Ibe3b30c32c2fb2caf3ed10a4198272dc13a44d12
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index f22c137..55eb02f 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -40,6 +40,7 @@
#include "update_engine/mock_payload_state.h"
#include "update_engine/omaha_hash_calculator.h"
#include "update_engine/omaha_request_params.h"
+#include "update_engine/platform_constants.h"
#include "update_engine/prefs.h"
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
@@ -211,7 +212,7 @@
// fake_system_state_.
OmahaRequestParams request_params_ = OmahaRequestParams{
&fake_system_state_,
- OmahaRequestParams::kOsPlatform,
+ constants::kOmahaPlatformName,
OmahaRequestParams::kOsVersion,
"service_pack",
"x86-generic",
@@ -1043,7 +1044,7 @@
// Make sure XML Encode is being called on the params
OmahaRequestParams params(&fake_system_state_,
- OmahaRequestParams::kOsPlatform,
+ constants::kOmahaPlatformName,
OmahaRequestParams::kOsVersion,
"testtheservice_pack>",
"x86 generic<id",
@@ -1236,7 +1237,7 @@
const char* delta_okay_str = delta_okay ? "true" : "false";
chromeos::Blob post_data;
OmahaRequestParams params(&fake_system_state_,
- OmahaRequestParams::kOsPlatform,
+ constants::kOmahaPlatformName,
OmahaRequestParams::kOsVersion,
"service_pack",
"x86-generic",
@@ -1277,7 +1278,7 @@
chromeos::Blob post_data;
FakeSystemState fake_system_state;
OmahaRequestParams params(&fake_system_state_,
- OmahaRequestParams::kOsPlatform,
+ constants::kOmahaPlatformName,
OmahaRequestParams::kOsVersion,
"service_pack",
"x86-generic",