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

Unified Diff: base/sys_info_chromeos.cc

Issue 2489853002: Added function to provide the short board name of the device (Closed)
Patch Set: Nit Created 4 years, 1 month 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 | « base/sys_info.h ('k') | base/sys_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_chromeos.cc
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index e4d671f75d956eadcff5d8dd5adddbab4e5d33d5..29f83845dc52edbf3113cf4412bb7e3a77eb8acf 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -200,6 +200,16 @@ std::string SysInfo::GetLsbReleaseBoard() {
}
// static
+std::string SysInfo::GetStrippedReleaseBoard() {
+ std::string board = GetLsbReleaseBoard();
+ const size_t index = board.find("-signed-");
+ if (index != std::string::npos)
+ board.resize(index);
+
+ return base::ToLowerASCII(board);
+}
+
+// static
Time SysInfo::GetLsbReleaseTime() {
return GetChromeOSVersionInfo().lsb_release_time();
}
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698