| Index: chrome/browser/chromeos/policy/device_status_collector.h
|
| diff --git a/chrome/browser/chromeos/policy/device_status_collector.h b/chrome/browser/chromeos/policy/device_status_collector.h
|
| index 80ee95d17276b9977d90216ef29a94f6aef4a9c5..47d05f377901dc50d0af63bf19b904a970f2fe80 100644
|
| --- a/chrome/browser/chromeos/policy/device_status_collector.h
|
| +++ b/chrome/browser/chromeos/policy/device_status_collector.h
|
| @@ -26,6 +26,7 @@
|
| #include "chrome/browser/chromeos/settings/cros_settings.h"
|
| #include "chromeos/system/version_loader.h"
|
| #include "components/policy/proto/device_management_backend.pb.h"
|
| +#include "mojo/public/cpp/bindings/string.h"
|
| #include "ui/base/idle/idle.h"
|
|
|
| namespace chromeos {
|
| @@ -68,6 +69,14 @@ class DeviceStatusCollector {
|
| using CPUTempFetcher =
|
| base::Callback<std::vector<enterprise_management::CPUTempInfo>()>;
|
|
|
| + // Passed into asynchronous mojo interface for communicating with Android.
|
| + using AndroidStatusReceiver =
|
| + base::Callback<void(mojo::String, mojo::String)>;
|
| + // Calls the enterprise reporting mojo interface, passing over the
|
| + // AndroidStatusReceiver.
|
| + using AndroidStatusFetcher =
|
| + base::Callback<bool(const AndroidStatusReceiver&)>;
|
| +
|
| // Called in the UI thread after the device and session status have been
|
| // collected asynchronously in GetDeviceAndSessionStatusAsync. Null pointers
|
| // indicate errors or that device or session status reporting is disabled.
|
| @@ -84,7 +93,8 @@ class DeviceStatusCollector {
|
| chromeos::system::StatisticsProvider* provider,
|
| const VolumeInfoFetcher& volume_info_fetcher,
|
| const CPUStatisticsFetcher& cpu_statistics_fetcher,
|
| - const CPUTempFetcher& cpu_temp_fetcher);
|
| + const CPUTempFetcher& cpu_temp_fetcher,
|
| + const AndroidStatusFetcher& android_status_fetcher_);
|
| virtual ~DeviceStatusCollector();
|
|
|
| // Gathers device and session status information and calls the passed response
|
| @@ -183,6 +193,9 @@ class DeviceStatusCollector {
|
| // a |GetStatusState| instance.
|
| bool GetAccountStatus(
|
| enterprise_management::SessionStatusReportRequest* status);
|
| + bool GetAndroidStatus(
|
| + enterprise_management::SessionStatusReportRequest* status,
|
| + scoped_refptr<GetStatusState> state); // Queues async queries!
|
|
|
| // Update the cached values of the reporting settings.
|
| void UpdateReportingSettings();
|
| @@ -230,6 +243,8 @@ class DeviceStatusCollector {
|
| // Callback invoked to fetch information about cpu temperature.
|
| CPUTempFetcher cpu_temp_fetcher_;
|
|
|
| + AndroidStatusFetcher android_status_fetcher_;
|
| +
|
| chromeos::system::StatisticsProvider* const statistics_provider_;
|
|
|
| chromeos::CrosSettings* const cros_settings_;
|
| @@ -246,6 +261,7 @@ class DeviceStatusCollector {
|
| bool report_users_ = false;
|
| bool report_hardware_status_ = false;
|
| bool report_session_status_ = false;
|
| + bool report_android_status_ = false;
|
| bool report_os_update_status_ = false;
|
| bool report_running_kiosk_app_ = false;
|
|
|
|
|