AU: Use crossystem hwid to obtain the hardware class.

This is more portable than reading the HWID from the ACPI file and should work
on ARM.

BUG=chromium-os:15255
TEST=unit tests, ran AU on Cr-48, checked the Omaha update check request

Change-Id: I8a2750140da7da99c217a6976f46b1b226696276
Reviewed-on: http://gerrit.chromium.org/gerrit/1078
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index f4f8fb2..0f5af5b 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -13,7 +13,6 @@
 #include <vector>
 
 #include <base/file_util.h>
-#include <base/string_util.h>
 
 #include "update_engine/simple_key_value_store.h"
 #include "update_engine/utils.h"
@@ -35,8 +34,6 @@
 const char* const OmahaRequestParams::kUpdateUrl(
     "https://tools.google.com/service/update2");
 
-static const char kHWIDPath[] = "/sys/devices/platform/chromeos_acpi/HWID";
-
 OmahaRequestDeviceParams::OmahaRequestDeviceParams() :
     force_lock_down_(false),
     forced_lock_down_(false) {}
@@ -61,7 +58,7 @@
       "",
       &chromeos_update_engine::OmahaRequestDeviceParams::IsValidTrack,
       true);  // stateful_override
-  hardware_class = GetHardwareClass();
+  hardware_class = utils::GetHardwareClass();
   struct stat stbuf;
 
   // Deltas are only okay if the /.nodelta file does not exist.  If we don't
@@ -165,16 +162,6 @@
   return ret;
 }
 
-string OmahaRequestDeviceParams::GetHardwareClass() const {
-  string hwid;
-  if (!file_util::ReadFileToString(FilePath(root_ + kHWIDPath), &hwid)) {
-    LOG(ERROR) << "Unable to determine the system hardware qualification ID.";
-    return "";
-  }
-  TrimWhitespaceASCII(hwid, TRIM_ALL, &hwid);
-  return hwid;
-}
-
 bool OmahaRequestDeviceParams::ShouldLockDown() const {
   if (force_lock_down_) {
     return forced_lock_down_;