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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.h

Issue 2528373002: Clarify AndroidStatusFetcher documentation (Closed)
Patch Set: Clarify AndroidStatusFetcher documentation Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4988191055e9c6b47a28b6118bc64736901fb29..5d33680e92429a1db8ca2d66ae19c4a4a2c0f011 100644
--- a/chrome/browser/chromeos/policy/device_status_collector.h
+++ b/chrome/browser/chromeos/policy/device_status_collector.h
@@ -68,7 +68,10 @@ class DeviceStatusCollector {
using AndroidStatusReceiver =
base::Callback<void(const std::string&, const std::string&)>;
// Calls the enterprise reporting mojo interface, passing over the
- // AndroidStatusReceiver.
+ // AndroidStatusReceiver. Returns false if the mojo interface isn't available,
+ // in which case no asynchronous query is emitted and the android status query
+ // fails synchronously. The |AndroidStatusReceiver| is not called in this
+ // case.
using AndroidStatusFetcher =
base::Callback<bool(const AndroidStatusReceiver&)>;
@@ -79,10 +82,10 @@ class DeviceStatusCollector {
std::unique_ptr<enterprise_management::DeviceStatusReportRequest>,
std::unique_ptr<enterprise_management::SessionStatusReportRequest>)>;
- // Constructor. Callers can inject their own VolumeInfoFetcher,
- // CPUStatisticsFetcher and CPUTempFetcher. These callbacks are executed on
- // Blocking Pool. A null callback can be passed for either parameter, to use
- // the default implementation.
+ // Constructor. Callers can inject their own *Fetcher callbacks, e.g. for unit
+ // testing. A null callback can be passed for any *Fetcher parameter, to use
+ // the default implementation. These callbacks are always executed on Blocking
+ // Pool.
DeviceStatusCollector(
PrefService* local_state,
chromeos::system::StatisticsProvider* provider,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698