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

Unified Diff: chromeos/system/fake_statistics_provider.cc

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.h ('k') | chromeos/system/statistics_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/system/fake_statistics_provider.cc
diff --git a/chromeos/system/fake_statistics_provider.cc b/chromeos/system/fake_statistics_provider.cc
index e9f530b88b2cc3e81de912c9decf2683e63ba1b5..6c1f30e7520d8af95bcee94edbb9550e027c088d 100644
--- a/chromeos/system/fake_statistics_provider.cc
+++ b/chromeos/system/fake_statistics_provider.cc
@@ -38,6 +38,12 @@ bool FakeStatisticsProvider::GetMachineFlag(const std::string& name,
void FakeStatisticsProvider::Shutdown() {
}
+bool FakeStatisticsProvider::IsRunningOnVm() {
+ std::string is_vm;
+ return GetMachineStatistic(kIsVmKey, &is_vm) && is_vm == kIsVmValueTrue;
+}
+
+
void FakeStatisticsProvider::SetMachineStatistic(const std::string& key,
const std::string& value) {
machine_statistics_[key] = value;
« no previous file with comments | « chromeos/system/fake_statistics_provider.h ('k') | chromeos/system/statistics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698