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

Unified Diff: chromeos/system/version_loader.cc

Issue 1905113002: Add ARC version to help and version pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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 | « chromeos/system/version_loader.h ('k') | components/version_ui/resources/about_version.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/system/version_loader.cc
diff --git a/chromeos/system/version_loader.cc b/chromeos/system/version_loader.cc
index f62ea0668d4fdcf852fb279408d34e0c599874bf..e5d0a297b49bf673e95e65239ebef78fab924419 100644
--- a/chromeos/system/version_loader.cc
+++ b/chromeos/system/version_loader.cc
@@ -29,6 +29,9 @@ const char kFullVersionKey[] = "CHROMEOS_RELEASE_DESCRIPTION";
// Same but for short version (x.x.xx.x).
const char kVersionKey[] = "CHROMEOS_RELEASE_VERSION";
+// Same but for ARC version.
+const char kArcVersionKey[] = "CHROMEOS_ARC_VERSION";
+
// Beginning of line we look for that gives the firmware version.
const char kFirmwarePrefix[] = "version";
@@ -58,6 +61,15 @@ std::string GetVersion(VersionFormat format) {
return version;
}
+std::string GetARCVersion() {
+ std::string version;
+ if (!base::SysInfo::GetLsbReleaseValue(kArcVersionKey, &version)) {
+ LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS())
+ << "No LSB version key: " << kArcVersionKey;
+ }
+ return version;
+}
+
std::string GetFirmware() {
std::string firmware;
std::string contents;
« no previous file with comments | « chromeos/system/version_loader.h ('k') | components/version_ui/resources/about_version.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698