summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/update_engine_client.h
diff options
context:
space:
mode:
authorygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 10:10:00 +0000
committerygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 10:10:00 +0000
commitf1ed3ad967b977a0c4c7e97da25a82cf620ec08f (patch)
tree847e4a8e6cfe4ab79ce038d406b68ea347ad59b5 /chromeos/dbus/update_engine_client.h
parent59ba319354051d6baa1b42fe4b164da7b3481b4e (diff)
downloadchromium_src-f1ed3ad967b977a0c4c7e97da25a82cf620ec08f.zip
chromium_src-f1ed3ad967b977a0c4c7e97da25a82cf620ec08f.tar.gz
chromium_src-f1ed3ad967b977a0c4c7e97da25a82cf620ec08f.tar.bz2
Implemented new channel switcher UI.
Must be landed after: https://gerrit.chromium.org/gerrit/#/c/59422/ https://gerrit.chromium.org/gerrit/#/c/59427/ BUG=219292 TEST=tested on Linux ChromiumOS and Lumpy Review URL: https://chromiumcodereview.appspot.com/17437004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/update_engine_client.h')
-rw-r--r--chromeos/dbus/update_engine_client.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/chromeos/dbus/update_engine_client.h b/chromeos/dbus/update_engine_client.h
index 914094e..26e4bfa 100644
--- a/chromeos/dbus/update_engine_client.h
+++ b/chromeos/dbus/update_engine_client.h
@@ -14,7 +14,7 @@
namespace dbus {
class Bus;
-} // namespace
+}
namespace chromeos {
@@ -87,14 +87,22 @@ class CHROMEOS_EXPORT UpdateEngineClient {
// Reboots if update has been performed.
virtual void RebootAfterUpdate() = 0;
+ // DEPRECATED: Use SetChannel instead.
// Requests to set the release track (channel). |track| should look like
// "beta-channel" or "dev-channel".
virtual void SetReleaseTrack(const std::string& track) = 0;
// Called once GetReleaseTrack() is complete. Takes one parameter;
// - string: the release track name like "beta-channel".
- typedef base::Callback<void(const std::string&)> GetReleaseTrackCallback;
+ typedef base::Callback<void(const std::string& channel_name)>
+ GetReleaseTrackCallback;
+ // 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;
+
+ // DEPRECATED: Use GetChannel() instead.
// Requests to get the release track and calls |callback| with the
// release track (channel). On error, calls |callback| with an empty
// string.
@@ -106,6 +114,27 @@ class CHROMEOS_EXPORT UpdateEngineClient {
// that need this information.
virtual Status GetLastStatus() = 0;
+ // Changes the current channel of the device to the target
+ // channel. If the target channel is a less stable channel than the
+ // current channel, then the channel change happens immediately (at
+ // the next update check). If the target channel is a more stable
+ // channel, then if |is_powerwash_allowed| is set to true, then also
+ // the change happens immediately but with a powerwash if
+ // required. Otherwise, the change takes effect eventually (when the
+ // version on the target channel goes above the version number of
+ // what the device currently has). |target_channel| should look like
+ // "dev-channel", "beta-channel" or "stable-channel".
+ virtual void SetChannel(const std::string& target_channel,
+ bool is_powerwash_allowed) = 0;
+
+ // If |get_current_channel| is set to true, calls |callback| with
+ // the name of the channel that the device is currently
+ // on. Otherwise, it calls it with the name of the channel the
+ // device is supposed to be (in case of a pending channel
+ // change). On error, calls |callback| with an empty string.
+ virtual void GetChannel(bool get_current_channel,
+ const GetChannelCallback& callback) = 0;
+
// Returns an empty UpdateCheckCallback that does nothing.
static UpdateCheckCallback EmptyUpdateCheckCallback();