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

Unified Diff: chromeos/dbus/update_engine_client.cc

Issue 565903002: Fixed "Relaunch and Powerwash" button on a chrome://help page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes. Created 6 years, 3 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 | « chrome/browser/resources/help/help_page.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/update_engine_client.cc
diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc
index fd1bc2a251e990d3f876ba692f187354d1d94c3f..f1866f5cfb99a0acf9c36d9b968553bc56aecd9d 100644
--- a/chromeos/dbus/update_engine_client.cc
+++ b/chromeos/dbus/update_engine_client.cc
@@ -396,6 +396,11 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
// The UpdateEngineClient implementation used on Linux desktop,
// which does nothing.
class UpdateEngineClientStubImpl : public UpdateEngineClient {
+ public:
+ UpdateEngineClientStubImpl()
+ : current_channel_(kReleaseChannelBeta),
+ target_channel_(kReleaseChannelBeta) {}
+
// UpdateEngineClient implementation:
virtual void Init(dbus::Bus* bus) OVERRIDE {}
virtual void AddObserver(Observer* observer) OVERRIDE {}
@@ -418,13 +423,20 @@ class UpdateEngineClientStubImpl : public UpdateEngineClient {
VLOG(1) << "Requesting to set channel: "
<< "target_channel=" << target_channel << ", "
<< "is_powerwash_allowed=" << is_powerwash_allowed;
+ target_channel_ = target_channel;
}
virtual void GetChannel(bool get_current_channel,
const GetChannelCallback& callback) OVERRIDE {
VLOG(1) << "Requesting to get channel, get_current_channel="
<< get_current_channel;
- callback.Run(kReleaseChannelBeta);
+ if (get_current_channel)
+ callback.Run(current_channel_);
+ else
+ callback.Run(target_channel_);
}
+
+ std::string current_channel_;
+ std::string target_channel_;
};
// The UpdateEngineClient implementation used on Linux desktop, which
« no previous file with comments | « chrome/browser/resources/help/help_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698