buffet: Refactor async operations.
Use less of lambdas and keep the logic in methods.
BUG=None
TEST=cros_workon_make buffet --test&&manual
Change-Id: I6bc3bddaa69763b029af6960630b1bd1e5f5c30e
Reviewed-on: https://chromium-review.googlesource.com/225960
Reviewed-by: Anton Muhin <antonm@chromium.org>
Commit-Queue: Anton Muhin <antonm@chromium.org>
Tested-by: Anton Muhin <antonm@chromium.org>
diff --git a/buffet/device_registration_info.h b/buffet/device_registration_info.h
index 80c57d8..c683e37 100644
--- a/buffet/device_registration_info.h
+++ b/buffet/device_registration_info.h
@@ -136,6 +136,15 @@
CloudRequestCallback callback,
CloudRequestErroback errorback);
+ void UpdateDeviceResource(base::Closure callback);
+
+ void FetchCommands(base::Callback<void(const base::ListValue&)> callback);
+
+ void AbortLimboCommands(base::Closure callback,
+ const base::ListValue& commands);
+
+ void PeriodicallyPollCommands();
+
// Builds Cloud API devices collection REST resouce which matches
// current state of the device including command definitions
// for all supported commands and current device state.