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

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: fix after review comments (no functional changes) 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
« no previous file with comments | « chromeos/system/fake_statistics_provider.cc ('k') | chromeos/system/statistics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/system/statistics_provider.h
diff --git a/chromeos/system/statistics_provider.h b/chromeos/system/statistics_provider.h
index 2b96fbf1097dfa321b0eca64f3750a62d4f27aaa..62305e8a3ce9e892e16c5491cc0fd1c7bf135b4a 100644
--- a/chromeos/system/statistics_provider.h
+++ b/chromeos/system/statistics_provider.h
@@ -44,10 +44,11 @@ CHROMEOS_EXPORT extern const char kFirmwareTypeValueNormal[];
// HWID key.
CHROMEOS_EXPORT extern const char kHardwareClassKey[];
-// 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.
-CHROMEOS_EXPORT extern const char kSystemVendorKey[];
+// 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 kIsVmKey[];
+CHROMEOS_EXPORT extern const char kIsVmValueTrue[];
+CHROMEOS_EXPORT extern const char kIsVmValueFalse[];
// OEM customization flag that permits exiting enterprise enrollment flow in
// OOBE when 'oem_enterprise_managed' flag is set.
@@ -111,6 +112,9 @@ class CHROMEOS_EXPORT StatisticsProvider {
// Cancels any pending file operations.
virtual void Shutdown() = 0;
+ // Returns true if the machine is a VM.
+ virtual bool IsRunningOnVm() = 0;
+
// Get the Singleton instance.
static StatisticsProvider* GetInstance();
« no previous file with comments | « chromeos/system/fake_statistics_provider.cc ('k') | chromeos/system/statistics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698