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

Unified Diff: chromeos/system/statistics_provider.h

Issue 2218703006: Clean up handling of invalid HWID when running ChromeOS in VMs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 4 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
Index: chromeos/system/statistics_provider.h
diff --git a/chromeos/system/statistics_provider.h b/chromeos/system/statistics_provider.h
index 2b96fbf1097dfa321b0eca64f3750a62d4f27aaa..3dd4a28f54cd7463def4cbfa17d0cb3b3e4779ea 100644
--- a/chromeos/system/statistics_provider.h
+++ b/chromeos/system/statistics_provider.h
@@ -44,9 +44,14 @@ CHROMEOS_EXPORT extern const char kFirmwareTypeValueNormal[];
// HWID key.
CHROMEOS_EXPORT extern const char kHardwareClassKey[];
+// Key/values reporting if Chrome OS is running in a VM or not. These values are
+// read from crossystem output. See crossystem source for VM detection logic.
+CHROMEOS_EXPORT extern const char kIsCrosVmKey[];
+CHROMEOS_EXPORT extern const char kIsCrosVmValueTrue[];
+CHROMEOS_EXPORT extern const char kIsCrosVmValueFalse[];
+
// System vendor key.
-// The value is used to check if Chrome is running on a VM or a real Chrome OS
-// device. On QEMU VMs this value is QEMU.
+// Empty on non-x86 architectures, most meaningful in VM environments
Daniel Erat 2016/08/10 16:32:28 nit: add trailing period
CHROMEOS_EXPORT extern const char kSystemVendorKey[];
achuithb 2016/08/10 18:24:58 We should just get rid of kSystemVendorKey. I beli
norvez 2016/08/11 17:10:34 Done.
// OEM customization flag that permits exiting enterprise enrollment flow in
@@ -111,6 +116,9 @@ class CHROMEOS_EXPORT StatisticsProvider {
// Cancels any pending file operations.
virtual void Shutdown() = 0;
+ // Returns true if the machine is a VM
Daniel Erat 2016/08/10 16:32:28 nit: add trailing period
norvez 2016/08/11 17:10:34 Done.
+ virtual bool IsRunningOnVm() = 0;
+
// Get the Singleton instance.
static StatisticsProvider* GetInstance();

Powered by Google App Engine
This is Rietveld 408576698