Chromium Code Reviews| 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..6004b759436646a68e65309ad95c9c9d5751d3a5 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_); |
|
bartfab (slow)
2016/10/06 15:43:26
Nit: s/fetcher_/fetcher/
phweiss
2016/10/06 15:58:01
Done.
|
| virtual ~DeviceStatusCollector(); |
| // Gathers device and session status information and calls the passed response |
| @@ -181,8 +191,11 @@ class DeviceStatusCollector { |
| // Helpers for the various portions of SESSION STATUS. Return true if they |
| // actually report any status. Functions that queue async queries take |
| // a |GetStatusState| instance. |
| - bool GetAccountStatus( |
| + bool GetKioskSessionStatus( |
| enterprise_management::SessionStatusReportRequest* status); |
| + bool GetAndroidStatus( |
| + enterprise_management::SessionStatusReportRequest* status, |
| + scoped_refptr<GetStatusState> state); // Queues async queries! |
|
bartfab (slow)
2016/10/06 15:43:26
Nit 1: #include "base/memory/ref_counted.h"
Nit 2:
phweiss
2016/10/06 15:58:01
Done.
|
| // 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_; |
| @@ -245,7 +260,8 @@ class DeviceStatusCollector { |
| bool report_network_interfaces_ = false; |
| bool report_users_ = false; |
| bool report_hardware_status_ = false; |
| - bool report_session_status_ = false; |
| + bool report_kiosk_session_status_ = false; |
| + bool report_android_status_ = false; |
| bool report_os_update_status_ = false; |
| bool report_running_kiosk_app_ = false; |