Chromium Code Reviews| Index: chromeos/dbus/auth_policy_client.cc |
| diff --git a/chromeos/dbus/auth_policy_client.cc b/chromeos/dbus/auth_policy_client.cc |
| index 9ff1ea4cb34b2bbda353760619576299293f6c1f..a4f58c519e77fff2097876f07995e418635f0d8c 100644 |
| --- a/chromeos/dbus/auth_policy_client.cc |
| +++ b/chromeos/dbus/auth_policy_client.cc |
| @@ -131,16 +131,11 @@ class AuthPolicyClientImpl : public AuthPolicyClient { |
| } |
| dbus::MessageReader reader(response); |
| const authpolicy::ErrorType error(GetErrorFromReader(&reader)); |
| - if (reader.PopArrayOfBytesAsProto(&account_data)) { |
| - callback.Run(error, account_data); |
| + if (!reader.PopArrayOfBytesAsProto(&account_data)) { |
| + DLOG(ERROR) << "Failed to parse protobuf."; |
|
Thiemo Nagel
2017/03/21 13:30:01
Nit: Why not use LOG(ERROR)?
Roman Sorokin (ftl)
2017/03/21 13:43:00
Just not to bloat the binary. Should probably dele
Thiemo Nagel
2017/03/21 13:45:37
Sounds good.
|
| + callback.Run(authpolicy::ErrorType::ERROR_DBUS_FAILURE, account_data); |
| return; |
| } |
| - DLOG(WARNING) << "Failed to parse protobuf. Fallback to string"; |
| - // TODO(rsorokin): Remove once both ChromiumOS and Chromium use protobuf. |
| - std::string account_id; |
| - if (!reader.PopString(&account_id)) |
| - DLOG(ERROR) << "Auth: Failed to get user_id from the response"; |
| - account_data.set_account_id(account_id); |
| callback.Run(error, account_data); |
| } |