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

Unified Diff: chromeos/dbus/session_manager_client.cc

Issue 10928088: Factory reset screen is added (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 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
« chrome/common/chrome_switches.h ('K') | « chromeos/dbus/session_manager_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/session_manager_client.cc
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index ef47500c7220beb379f1e980a8d7158dbb76ce63..f35f5719a8958c5c54da6059b0369bada1181a41 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -127,6 +127,16 @@ class SessionManagerClientImpl : public SessionManagerClient {
weak_ptr_factory_.GetWeakPtr()));
}
+ virtual void StartDeviceWipe() OVERRIDE {
+ dbus::MethodCall method_call(login_manager::kSessionManagerInterface,
+ login_manager::kSessionManagerStartDeviceWipe);
+ session_manager_proxy_->CallMethod(
+ &method_call,
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&SessionManagerClientImpl::OnDeviceWipe,
+ weak_ptr_factory_.GetWeakPtr()));
+ }
+
virtual void RequestLockScreen() OVERRIDE {
SimpleMethodCallToSessionManager(login_manager::kSessionManagerLockScreen);
}
@@ -240,6 +250,13 @@ class SessionManagerClientImpl : public SessionManagerClient {
<< login_manager::kSessionManagerStopSession;
}
+ // Called when kSessionManagerStopSession method is complete.
+ void OnDeviceWipe(dbus::Response* response) {
+ LOG_IF(ERROR, !response)
+ << "Failed to call "
+ << login_manager::kSessionManagerStartDeviceWipe;
+ }
+
// Called when kSessionManagerRetrievePolicy or
// kSessionManagerRetrieveUserPolicy method is complete.
void OnRetrievePolicy(const std::string& method_name,
@@ -354,6 +371,7 @@ class SessionManagerClientStubImpl : public SessionManagerClient {
virtual void RestartEntd() OVERRIDE {}
virtual void StartSession(const std::string& user_email) OVERRIDE {}
virtual void StopSession() OVERRIDE {}
+ virtual void StartDeviceWipe() OVERRIDE {}
virtual void RequestLockScreen() OVERRIDE {
screen_locked_ = true;
FOR_EACH_OBSERVER(Observer, observers_, LockScreen());
« chrome/common/chrome_switches.h ('K') | « chromeos/dbus/session_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698