Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ | 5 #ifndef CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ |
| 6 #define CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ | 6 #define CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 // machine doesn't run on Chrome OS firmware. See crossystem source for more | 37 // machine doesn't run on Chrome OS firmware. See crossystem source for more |
| 38 // details. | 38 // details. |
| 39 CHROMEOS_EXPORT extern const char kFirmwareTypeKey[]; | 39 CHROMEOS_EXPORT extern const char kFirmwareTypeKey[]; |
| 40 CHROMEOS_EXPORT extern const char kFirmwareTypeValueDeveloper[]; | 40 CHROMEOS_EXPORT extern const char kFirmwareTypeValueDeveloper[]; |
| 41 CHROMEOS_EXPORT extern const char kFirmwareTypeValueNonchrome[]; | 41 CHROMEOS_EXPORT extern const char kFirmwareTypeValueNonchrome[]; |
| 42 CHROMEOS_EXPORT extern const char kFirmwareTypeValueNormal[]; | 42 CHROMEOS_EXPORT extern const char kFirmwareTypeValueNormal[]; |
| 43 | 43 |
| 44 // HWID key. | 44 // HWID key. |
| 45 CHROMEOS_EXPORT extern const char kHardwareClassKey[]; | 45 CHROMEOS_EXPORT extern const char kHardwareClassKey[]; |
| 46 | 46 |
| 47 // Key/values reporting if Chrome OS is running in a VM or not. These values are | |
| 48 // read from crossystem output. See crossystem source for VM detection logic. | |
| 49 CHROMEOS_EXPORT extern const char kIsCrosVMKey[]; | |
| 50 CHROMEOS_EXPORT extern const char kIsCrosVMValueTrue[]; | |
| 51 CHROMEOS_EXPORT extern const char kIsCrosVMValueFalse[]; | |
|
Daniel Erat
2016/08/10 13:58:05
nit: change "VM" to "Vm" in all of these (https://
| |
| 52 | |
| 47 // System vendor key. | 53 // System vendor key. |
| 48 // The value is used to check if Chrome is running on a VM or a real Chrome OS | 54 // Empty on non-x86 architectures, most meaningful in VM environments |
| 49 // device. On QEMU VMs this value is QEMU. | |
| 50 CHROMEOS_EXPORT extern const char kSystemVendorKey[]; | 55 CHROMEOS_EXPORT extern const char kSystemVendorKey[]; |
| 51 | 56 |
| 52 // OEM customization flag that permits exiting enterprise enrollment flow in | 57 // OEM customization flag that permits exiting enterprise enrollment flow in |
| 53 // OOBE when 'oem_enterprise_managed' flag is set. | 58 // OOBE when 'oem_enterprise_managed' flag is set. |
| 54 CHROMEOS_EXPORT extern const char kOemCanExitEnterpriseEnrollmentKey[]; | 59 CHROMEOS_EXPORT extern const char kOemCanExitEnterpriseEnrollmentKey[]; |
| 55 | 60 |
| 56 // OEM customization directive that specified intended device purpose. | 61 // OEM customization directive that specified intended device purpose. |
| 57 CHROMEOS_EXPORT extern const char kOemDeviceRequisitionKey[]; | 62 CHROMEOS_EXPORT extern const char kOemDeviceRequisitionKey[]; |
| 58 | 63 |
| 59 // OEM customization flag that enforces enterprise enrollment flow in OOBE. | 64 // OEM customization flag that enforces enterprise enrollment flow in OOBE. |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 76 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootKey[]; | 81 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootKey[]; |
| 77 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootValueOff[]; | 82 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootValueOff[]; |
| 78 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootValueOn[]; | 83 CHROMEOS_EXPORT extern const char kWriteProtectSwitchBootValueOn[]; |
| 79 | 84 |
| 80 // Regional data | 85 // Regional data |
| 81 CHROMEOS_EXPORT extern const char kRegionKey[]; | 86 CHROMEOS_EXPORT extern const char kRegionKey[]; |
| 82 CHROMEOS_EXPORT extern const char kInitialLocaleKey[]; | 87 CHROMEOS_EXPORT extern const char kInitialLocaleKey[]; |
| 83 CHROMEOS_EXPORT extern const char kInitialTimezoneKey[]; | 88 CHROMEOS_EXPORT extern const char kInitialTimezoneKey[]; |
| 84 CHROMEOS_EXPORT extern const char kKeyboardLayoutKey[]; | 89 CHROMEOS_EXPORT extern const char kKeyboardLayoutKey[]; |
| 85 | 90 |
| 91 // Returns true when Chrome OS is running in a VM. NOTE: if crossystem is not | |
| 92 // installed it will return false even if Chrome OS is running in a VM. | |
| 93 CHROMEOS_EXPORT bool isRunningOnChromeOSVM(); | |
|
Daniel Erat
2016/08/10 13:58:05
s/is/Is/ (see naming conventions in style guide)
| |
| 94 | |
| 86 // This interface provides access to Chrome OS statistics. | 95 // This interface provides access to Chrome OS statistics. |
| 87 class CHROMEOS_EXPORT StatisticsProvider { | 96 class CHROMEOS_EXPORT StatisticsProvider { |
| 88 public: | 97 public: |
| 89 // Starts loading the machine statistics. File operations are performed on | 98 // Starts loading the machine statistics. File operations are performed on |
| 90 // |file_task_runner|. | 99 // |file_task_runner|. |
| 91 virtual void StartLoadingMachineStatistics( | 100 virtual void StartLoadingMachineStatistics( |
| 92 const scoped_refptr<base::TaskRunner>& file_task_runner, | 101 const scoped_refptr<base::TaskRunner>& file_task_runner, |
| 93 bool load_oem_manifest) = 0; | 102 bool load_oem_manifest) = 0; |
| 94 | 103 |
| 95 // Returns true if the named machine statistic (e.g. "hardware_class") is | 104 // Returns true if the named machine statistic (e.g. "hardware_class") is |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 118 static void SetTestProvider(StatisticsProvider* test_provider); | 127 static void SetTestProvider(StatisticsProvider* test_provider); |
| 119 | 128 |
| 120 protected: | 129 protected: |
| 121 virtual ~StatisticsProvider() {} | 130 virtual ~StatisticsProvider() {} |
| 122 }; | 131 }; |
| 123 | 132 |
| 124 } // namespace system | 133 } // namespace system |
| 125 } // namespace chromeos | 134 } // namespace chromeos |
| 126 | 135 |
| 127 #endif // CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ | 136 #endif // CHROMEOS_SYSTEM_STATISTICS_PROVIDER_H_ |
| OLD | NEW |