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_params.h b/omaha_request_params.h
index 7109518..099c07c 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -25,17 +25,13 @@
#include <base/time/time.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
+#include "update_engine/platform_constants.h"
+
// This gathers local system information and prepares info used by the
// Omaha request action.
namespace chromeos_update_engine {
-// The default "official" Omaha update URL.
-extern const char kProductionOmahaUrl[];
-
-// The autoupdate test Omaha update URL.
-extern const char kAUTestOmahaUrl[];
-
class SystemState;
// This class encapsulates the data Omaha gets for the request, along with
@@ -48,7 +44,7 @@
public:
explicit OmahaRequestParams(SystemState* system_state)
: system_state_(system_state),
- os_platform_(kOsPlatform),
+ os_platform_(constants::kOmahaPlatformName),
os_version_(kOsVersion),
board_app_id_(kAppId),
canary_app_id_(kAppId),
@@ -192,9 +188,7 @@
// Suggested defaults
static const char kAppId[];
- static const char kOsPlatform[];
static const char kOsVersion[];
- static const char kUpdateUrl[];
static const char kUpdateChannelKey[];
static const char kIsPowerwashAllowedKey[];
static const char kAutoUpdateServerKey[];