Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2164)

Unified Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 10542072: Chrome OS: Update serial number key priority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/browser_policy_connector.cc
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 322bd83432bf1ec48afb920de983a1c4c7dddf09..82d1bc50a78db30f017bb4b425e4964883b48154 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -74,17 +74,14 @@ const char kMachineInfoSystemHwqual[] = "hardware_class";
// These are the machine serial number keys that we check in order until we
// find a non-empty serial number. The VPD spec says the serial number should be
-// in the "serial_number" key for v2+ VPDs. However, we cannot check this first,
-// since we'd get the "serial_number" value from the SMBIOS (yes, there's a name
-// clash here!), which is different from the serial number we want and not
-// actually per-device. So, we check the legacy keys first. If we find a
-// serial number for these, we use it, otherwise we must be on a newer device
-// that provides the correct data in "serial_number".
+// in the "serial_number" key for v2+ VPDs. However, legacy devices used a
+// different keys to report their serial number, which we fall back to if
+// "serial_number" is not present.
const char* kMachineInfoSerialNumberKeys[] = {
- "sn", // ZGB
+ "serial_number", // VPD v2+ devices
"Product_S/N", // Alex
"Product_SN", // Mario
- "serial_number" // VPD v2+ devices
+ "sn", // old ZGB devices (more recent ones use serial_number)
};
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698