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

Unified Diff: chromeos/system/statistics_provider.cc

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… Created 6 years, 8 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.cc
diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc
index 93557b9e65972f5184a0ed320f15a06e0eb3d8a0..cc3375652a6599942bf45a1e96d9c3c9f3b0f933 100644
--- a/chromeos/system/statistics_provider.cc
+++ b/chromeos/system/statistics_provider.cc
@@ -37,6 +37,7 @@ const char kCrosSystemUnknownValue[] = "(error)";
const char kHardwareClassCrosSystemKey[] = "hwid";
const char kUnknownHardwareClass[] = "unknown";
+const char kSerialNumber[] = "sn";
// File to get machine hardware info from, and key/value delimiters of
// the file.
@@ -269,6 +270,12 @@ void StatisticsProviderImpl::LoadMachineStatistics(bool load_oem_manifest) {
oem_manifest_loaded_ = true;
}
+ if (!base::SysInfo::IsRunningOnChromeOS() &&
+ machine_info_.find(kSerialNumber) == machine_info_.end()) {
+ // Set stub value for testing.
+ machine_info_[kSerialNumber] = "stub_serial_number";
+ }
+
// Finished loading the statistics.
on_statistics_loaded_.Signal();
VLOG(1) << "Finished loading statistics.";

Powered by Google App Engine
This is Rietveld 408576698