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

Unified Diff: base/sys_info.h

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 | « ash/wm/lock_state_controller.cc ('k') | base/sys_info_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info.h
diff --git a/base/sys_info.h b/base/sys_info.h
index b10747703d230fab880732bd23ba08e6661c61f8..e35feff735e4ac3783d1870ae04d711ef7cdd7fc 100644
--- a/base/sys_info.h
+++ b/base/sys_info.h
@@ -107,9 +107,19 @@ class BASE_EXPORT SysInfo {
static bool GetLsbReleaseValue(const std::string& key, std::string* value);
// Convenience function for GetLsbReleaseValue("CHROMEOS_RELEASE_BOARD",...).
- // Returns "unknown" if CHROMEOS_RELEASE_BOARD is not set.
+ // Returns "unknown" if CHROMEOS_RELEASE_BOARD is not set. Otherwise returns
+ // the full name of the board. WARNING: the returned value often differs in
+ // developer built system compared to devices that use the official version.
+ // E.g. for developer built version, the function could return 'glimmer' while
+ // for officially used versions it would be like 'glimmer-signed-mp-v4keys'.
+ // Use GetStrippedReleaseBoard() function if you need only the short name of
+ // the board (would be 'glimmer' in the case described above).
static std::string GetLsbReleaseBoard();
+ // Convenience function for GetLsbReleaseBoard() removing trailing "-signed-*"
+ // if present. Returns "unknown" if CHROMEOS_RELEASE_BOARD is not set.
+ static std::string GetStrippedReleaseBoard();
+
// Returns the creation time of /etc/lsb-release. (Used to get the date and
// time of the Chrome OS build).
static Time GetLsbReleaseTime();
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | base/sys_info_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698