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

Unified Diff: chromeos/dbus/update_engine_client.h

Issue 2881473002: Make update over cellular an option for user (Closed)
Patch Set: remove DEPS as it is already update to date Created 3 years, 7 months 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 | « chromeos/dbus/fake_update_engine_client.cc ('k') | chromeos/dbus/update_engine_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/update_engine_client.h
diff --git a/chromeos/dbus/update_engine_client.h b/chromeos/dbus/update_engine_client.h
index 94c89ea7b50546c2f449b43f537636602f90d047..5206aa6e722b8553742d6dee27324f650de77430 100644
--- a/chromeos/dbus/update_engine_client.h
+++ b/chromeos/dbus/update_engine_client.h
@@ -40,7 +40,8 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
UPDATE_STATUS_FINALIZING,
UPDATE_STATUS_UPDATED_NEED_REBOOT,
UPDATE_STATUS_REPORTING_ERROR_EVENT,
- UPDATE_STATUS_ATTEMPTING_ROLLBACK
+ UPDATE_STATUS_ATTEMPTING_ROLLBACK,
+ UPDATE_STATUS_NEED_PERMISSION_TO_UPDATE,
};
// The status of the ongoing update attempt.
@@ -84,7 +85,7 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
// Called once RequestUpdateCheck() is complete. Takes one parameter:
// - UpdateCheckResult: the result of the update check.
- typedef base::Callback<void(UpdateCheckResult)> UpdateCheckCallback;
+ using UpdateCheckCallback = base::Callback<void(UpdateCheckResult)>;
// Requests an update check and calls |callback| when completed.
virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) = 0;
@@ -97,7 +98,7 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
// Called once CanRollbackCheck() is complete. Takes one parameter:
// - bool: the result of the rollback availability check.
- typedef base::Callback<void(bool can_rollback)> RollbackCheckCallback;
+ using RollbackCheckCallback = base::Callback<void(bool can_rollback)>;
// Checks if Rollback is available and calls |callback| when completed.
virtual void CanRollbackCheck(
@@ -105,8 +106,8 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
// Called once GetChannel() is complete. Takes one parameter;
// - string: the channel name like "beta-channel".
- typedef base::Callback<void(const std::string& channel_name)>
- GetChannelCallback;
+ using GetChannelCallback =
+ base::Callback<void(const std::string& channel_name)>;
// Returns the last status the object received from the update engine.
//
@@ -137,8 +138,8 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
// Called once GetEolStatus() is complete. Takes one parameter;
// - EndOfLife Status: the end of life status of the device.
- typedef base::Callback<void(update_engine::EndOfLifeStatus status)>
- GetEolStatusCallback;
+ using GetEolStatusCallback =
+ base::Callback<void(update_engine::EndOfLifeStatus status)>;
// Get EndOfLife status of the device and calls |callback| when completed.
virtual void GetEolStatus(const GetEolStatusCallback& callback) = 0;
@@ -149,6 +150,27 @@ class CHROMEOS_EXPORT UpdateEngineClient : public DBusClient {
bool allowed,
const base::Closure& callback) = 0;
+ // Called once SetUpdateOverCellularTarget() is complete. Takes one parameter;
+ // - success: indicates whether the target is set successfully.
+ using SetUpdateOverCellularTargetCallback =
+ base::Callback<void(bool success)>;
+
+ // Sets the target in the preferences maintained by update engine which then
+ // performs update to this given target after RequestUpdateCheck() is invoked
+ // in the |callback|.
+ // - target_version: the Chrome OS version we want to update to.
+ // - target_size: the size of that Chrome OS version in bytes.
+ // These two parameters are a failsafe to prevent downloading an update user
+ // didn't agree to. They should be set using the version and size we received
+ // from update engine when it broadcasts NEED_PERMISSION_TO_UPDATE. They are
+ // used by update engine to double-check with update server in case there's a
+ // new update available or a delta update becomes a full update with larger
+ // size.
+ virtual void SetUpdateOverCellularTarget(
+ const std::string& target_version,
+ int64_t target_size,
+ const SetUpdateOverCellularTargetCallback& callback) = 0;
+
// Returns an empty UpdateCheckCallback that does nothing.
static UpdateCheckCallback EmptyUpdateCheckCallback();
« no previous file with comments | « chromeos/dbus/fake_update_engine_client.cc ('k') | chromeos/dbus/update_engine_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698