Index: chromeos/dbus/session_manager_client.cc |
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc |
index 41c9785eac3e23ee01509627ba51aec2c77e31aa..ec0f11cf71e561b0e77f27f0901de42a0cb5fdd4 100644 |
--- a/chromeos/dbus/session_manager_client.cc |
+++ b/chromeos/dbus/session_manager_client.cc |
@@ -736,15 +736,8 @@ class SessionManagerClientImpl : public SessionManagerClient { |
void OnStorePolicy(const std::string& method_name, |
const StorePolicyCallback& callback, |
dbus::Response* response) { |
- bool success = false; |
- if (!response) { |
- LOG(ERROR) << "Failed to call " << method_name; |
- } else { |
- dbus::MessageReader reader(response); |
- if (!reader.PopBool(&success)) |
- LOG(ERROR) << "Invalid response: " << response->ToString(); |
- } |
- callback.Run(success); |
+ LOG_IF(ERROR, !response) << "Failed to call " << method_name; |
+ callback.Run(bool(response)); |
Daniel Erat
2017/05/18 16:32:27
i think we usually avoid using c-style casts. woul
hidehiko
2017/05/18 16:54:27
Good catch!
It is bool ctor, but can be interprete
|
} |
// Called when the owner key set signal is received. |