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

Unified Diff: chromeos/dbus/session_manager_client.cc

Issue 2277803005: Logging for RestartJob. (Closed)
Patch Set: Dan feedback Created 4 years, 4 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 | « no previous file | 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 8b99b6965126ec0a0101e8f5a25e786668c510d3..7d64e53f358cc2ca92d4d49c0d6fe5f9dad69e80 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -83,6 +83,10 @@ void CreateValidCredConduit(dbus::FileDescriptor* local_auth_fd,
remote_auth_fd->CheckValidity();
}
+void HandleDBusError(dbus::ErrorResponse* response) {
+ LOG(ERROR) << "DBus error " << response->ToString();
+}
+
} // namespace
// The SessionManagerClient implementation used in production.
@@ -498,6 +502,7 @@ class SessionManagerClientImpl : public SessionManagerClient {
void CallRestartJobWithValidFd(dbus::ScopedFileDescriptor local_auth_fd,
dbus::ScopedFileDescriptor remote_auth_fd,
const std::vector<std::string>& argv) {
+ VLOG(1) << "CallRestartJobWithValidFd";
dbus::MethodCall method_call(login_manager::kSessionManagerInterface,
login_manager::kSessionManagerRestartJob);
dbus::MessageWriter writer(&method_call);
@@ -507,11 +512,12 @@ class SessionManagerClientImpl : public SessionManagerClient {
// Ownership of local_auth_fd is passed to the callback that is to be
// called on completion of this method call. This keeps the browser end
// of the socket-pair alive for the duration of the RPC.
- session_manager_proxy_->CallMethod(
+ session_manager_proxy_->CallMethodWithErrorCallback(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&SessionManagerClientImpl::OnRestartJob,
weak_ptr_factory_.GetWeakPtr(),
- base::Passed(&local_auth_fd)));
+ base::Passed(&local_auth_fd)),
+ base::Bind(HandleDBusError));
}
// Called when kSessionManagerRestartJob method is complete.
@@ -519,6 +525,7 @@ class SessionManagerClientImpl : public SessionManagerClient {
// which will happen automatically when it goes out of scope.
void OnRestartJob(dbus::ScopedFileDescriptor local_auth_fd,
dbus::Response* response) {
+ VLOG(1) << "OnRestartJob";
LOG_IF(ERROR, !response)
<< "Failed to call "
<< login_manager::kSessionManagerRestartJob;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698