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.cc b/omaha_request_params.cc
index 6e8d636..4118a11 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -31,6 +31,7 @@
 
 #include "update_engine/constants.h"
 #include "update_engine/hardware_interface.h"
+#include "update_engine/platform_constants.h"
 #include "update_engine/system_state.h"
 #include "update_engine/utils.h"
 
@@ -42,14 +43,8 @@
 
 namespace chromeos_update_engine {
 
-const char kProductionOmahaUrl[] =
-    "https://tools.google.com/service/update2";
-const char kAUTestOmahaUrl[] =
-    "https://omaha.sandbox.google.com/service/update2";
-
 const char OmahaRequestParams::kAppId[] =
     "{87efface-864d-49a5-9bb3-4b050a7c227a}";
-const char OmahaRequestParams::kOsPlatform[] = "Chrome OS";
 const char OmahaRequestParams::kOsVersion[] = "Indy";
 const char OmahaRequestParams::kUpdateChannelKey[] = "CHROMEOS_RELEASE_TRACK";
 const char OmahaRequestParams::kIsPowerwashAllowedKey[] =
@@ -70,7 +65,7 @@
   LOG(INFO) << "Initializing parameters for this update attempt";
   InitFromLsbValue();
   bool stateful_override = !ShouldLockDown();
-  os_platform_ = OmahaRequestParams::kOsPlatform;
+  os_platform_ = constants::kOmahaPlatformName;
   os_version_ = OmahaRequestParams::kOsVersion;
   app_version_ = in_app_version.empty() ?
       GetLsbValue("CHROMEOS_RELEASE_VERSION", "", nullptr, stateful_override) :
@@ -117,7 +112,8 @@
   }
 
   if (in_update_url.empty())
-    update_url_ = GetLsbValue(kAutoUpdateServerKey, kProductionOmahaUrl,
+    update_url_ = GetLsbValue(kAutoUpdateServerKey,
+                              constants::kOmahaDefaultProductionURL,
                               nullptr, stateful_override);
   else
     update_url_ = in_update_url;
@@ -128,8 +124,9 @@
 }
 
 bool OmahaRequestParams::IsUpdateUrlOfficial() const {
-  return (update_url_ == kAUTestOmahaUrl ||
-          update_url_ == GetLsbValue(kAutoUpdateServerKey, kProductionOmahaUrl,
+  return (update_url_ == constants::kOmahaDefaultAUTestURL ||
+          update_url_ == GetLsbValue(kAutoUpdateServerKey,
+                                     constants::kOmahaDefaultProductionURL,
                                      nullptr, !ShouldLockDown()));
 }