Index: chrome/browser/chromeos/login/version_info_updater.cc |
diff --git a/chrome/browser/chromeos/login/version_info_updater.cc b/chrome/browser/chromeos/login/version_info_updater.cc |
index 0b0d7f8c6c2a76151ab3e5adcfe1d27f12a47082..edd28576eb96c3e223178d7555167d904c9de721 100644 |
--- a/chrome/browser/chromeos/login/version_info_updater.cc |
+++ b/chrome/browser/chromeos/login/version_info_updater.cc |
@@ -33,7 +33,10 @@ const char* kReportingFlags[] = { |
chromeos::kReportDeviceLocation, |
}; |
-} |
+// Strings used to generate the serial number part of the version string. |
+const char kSerialNumberPrefix[] = "SN:"; |
+ |
+} // namespace |
/////////////////////////////////////////////////////////////////////////////// |
// VersionInfoUpdater public: |
@@ -92,12 +95,15 @@ void VersionInfoUpdater::UpdateVersionLabel() { |
if (version_text_.empty()) |
return; |
+ UpdateSerialNumberInfo(); |
+ |
chrome::VersionInfo version_info; |
std::string label_text = l10n_util::GetStringFUTF8( |
IDS_LOGIN_VERSION_LABEL_FORMAT, |
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
base::UTF8ToUTF16(version_info.Version()), |
- base::UTF8ToUTF16(version_text_)); |
+ base::UTF8ToUTF16(version_text_), |
+ base::UTF8ToUTF16(serial_number_text_)); |
// Workaround over incorrect width calculation in old fonts. |
// TODO(glotov): remove the following line when new fonts are used. |
@@ -124,6 +130,14 @@ void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name) { |
} |
} |
+void VersionInfoUpdater::UpdateSerialNumberInfo() { |
+ std::string sn = policy::DeviceCloudPolicyManagerChromeOS::GetMachineID(); |
+ if (!sn.empty()) { |
+ serial_number_text_ = kSerialNumberPrefix; |
+ serial_number_text_.append(sn); |
+ } |
+} |
+ |
void VersionInfoUpdater::OnVersion(const std::string& version) { |
version_text_ = version; |
UpdateVersionLabel(); |