summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_observers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation/automation_provider_observers.cc')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index f496a7a..11d6b43 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1144,18 +1144,20 @@ LoginManagerObserver::LoginManagerObserver(
: automation_(automation),
reply_message_(reply_message) {
- registrar_.Add(this, NotificationType::LOGIN_AUTHENTICATION,
+ registrar_.Add(this, NotificationType::LOGIN_USER_CHANGED,
NotificationService::AllSources());
}
void LoginManagerObserver::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::LOGIN_AUTHENTICATION);
+ DCHECK(type == NotificationType::LOGIN_USER_CHANGED);
+ AutomationJSONReply reply(automation_, reply_message_);
Details<AuthenticationNotificationDetails> auth_details(details);
- AutomationMsg_LoginWithUserAndPass::WriteReplyParams(reply_message_,
- auth_details->success());
- automation_->Send(reply_message_);
+ if (auth_details->success())
+ reply.SendSuccess(NULL);
+ else
+ reply.SendError("Login failure.");
delete this;
}
#endif