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

Unified Diff: chromeos/dbus/auth_policy_client.cc

Issue 2587993002: Chromad: Switch AuthPolicyClient to use cros_system_api enums. (Closed)
Patch Set: Created 4 years 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
Index: chromeos/dbus/auth_policy_client.cc
diff --git a/chromeos/dbus/auth_policy_client.cc b/chromeos/dbus/auth_policy_client.cc
index 98bf6a6fc5fb5665eaa3167dc6bf103993f1c021..434dccb32b2c2a7d5e19f4d655461c6df8761c5b 100644
--- a/chromeos/dbus/auth_policy_client.cc
+++ b/chromeos/dbus/auth_policy_client.cc
@@ -8,7 +8,6 @@
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_proxy.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
@@ -81,20 +80,20 @@ class AuthPolicyClientImpl : public AuthPolicyClient {
if (!response) {
LOG(ERROR) << "Join: Couldn't call to authpolicy";
// TODO(rsorokin): make proper call, after defining possible errors codes.
- callback.Run(authpolicy::types::AD_JOIN_ERROR_UNKNOWN);
+ callback.Run(authpolicy::AD_JOIN_ERROR_UNKNOWN);
return;
}
dbus::MessageReader reader(response);
- int res = authpolicy::types::AD_JOIN_ERROR_UNKNOWN;
+ int32_t res = static_cast<int32_t>(authpolicy::AD_JOIN_ERROR_UNKNOWN);
if (!reader.PopInt32(&res)) {
LOG(ERROR) << "Join: Couldn't get an error from the response";
// TODO(rsorokin): make proper call, after defining possible errors codes.
- callback.Run(authpolicy::types::AD_JOIN_ERROR_DBUS_FAIL);
+ callback.Run(authpolicy::AD_JOIN_ERROR_DBUS_FAILURE);
return;
}
- callback.Run(res);
+ callback.Run(static_cast<authpolicy::ADJoinErrorType>(res));
}
dbus::Bus* bus_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698