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

Unified Diff: chromeos/dbus/session_manager_client.cc

Issue 2887323002: Do not read redundant output param for StorePolicy DBus call family. (Closed)
Patch Set: Use var. Created 3 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 | « 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 41c9785eac3e23ee01509627ba51aec2c77e31aa..fa1d9ae72a884c3b05a1a47bbff259de530839d0 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -736,14 +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();
- }
+ bool success = response != nullptr;
+ LOG_IF(ERROR, !success) << "Failed to call " << method_name;
callback.Run(success);
}
« 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