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

Unified Diff: chromeos/dbus/session_manager_client.cc

Issue 268293002: Revert of Start session fail causes restart chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/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 486ce595f998fe9aaae791838eb75f8dba29617e..27858284366571281b977be3666941f1a02c29a2 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -71,8 +71,7 @@
weak_ptr_factory_.GetWeakPtr()));
}
- virtual void StartSession(const std::string& user_email,
- const StartSessionCallback& callback) OVERRIDE {
+ virtual void StartSession(const std::string& user_email) OVERRIDE {
dbus::MethodCall method_call(login_manager::kSessionManagerInterface,
login_manager::kSessionManagerStartSession);
dbus::MessageWriter writer(&method_call);
@@ -82,8 +81,7 @@
&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&SessionManagerClientImpl::OnStartSession,
- weak_ptr_factory_.GetWeakPtr(),
- callback));
+ weak_ptr_factory_.GetWeakPtr()));
}
virtual void StopSession() OVERRIDE {
@@ -334,18 +332,10 @@
}
// Called when kSessionManagerStartSession method is complete.
- void OnStartSession(const StartSessionCallback& callback,
- dbus::Response* response) {
- bool success = false;
- if (!response) {
- LOG(ERROR) << "Failed to call "
- << login_manager::kSessionManagerStartSession;
- } else {
- dbus::MessageReader reader(response);
- if (!reader.PopBool(&success))
- LOG(ERROR) << "Invalid response: " << response->ToString();
- }
- callback.Run(success);
+ void OnStartSession(dbus::Response* response) {
+ LOG_IF(ERROR, !response)
+ << "Failed to call "
+ << login_manager::kSessionManagerStartSession;
}
// Called when kSessionManagerStopSession method is complete.
@@ -528,10 +518,7 @@
}
virtual void EmitLoginPromptVisible() OVERRIDE {}
virtual void RestartJob(int pid, const std::string& command_line) OVERRIDE {}
- virtual void StartSession(const std::string& user_email,
- const StartSessionCallback& callback) OVERRIDE {
- callback.Run(true);
- }
+ virtual void StartSession(const std::string& user_email) OVERRIDE {}
virtual void StopSession() OVERRIDE {}
virtual void StartDeviceWipe() OVERRIDE {}
virtual void RequestLockScreen() OVERRIDE {
« no previous file with comments | « chromeos/dbus/session_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698