| Index: chrome/browser/ui/login/login_prompt.cc
|
| diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
|
| index d653457de8ed16f517d42939b3146bac51be62ce..ec619088adf91ac8903d7759a9d876b6c22c57b8 100644
|
| --- a/chrome/browser/ui/login/login_prompt.cc
|
| +++ b/chrome/browser/ui/login/login_prompt.cc
|
| @@ -196,17 +196,17 @@ void LoginHandler::Observe(NotificationType type,
|
| if (!requesting_contents)
|
| return;
|
|
|
| - NavigationController* this_controller = &requesting_contents->controller();
|
| - NavigationController* that_controller =
|
| - Source<NavigationController>(source).ptr();
|
| -
|
| - // Only handle notifications from other handlers.
|
| - if (this_controller == that_controller)
|
| + // Break out early if we aren't interested in the notification.
|
| + if (WasAuthHandled(false))
|
| return;
|
|
|
| LoginNotificationDetails* login_details =
|
| Details<LoginNotificationDetails>(details).ptr();
|
|
|
| + // WasAuthHandled(false) should always test positive before we
|
| + // publish AUTH_SUPPLIED or AUTH_CANCELLED notifications.
|
| + DCHECK(login_details->handler() != this);
|
| +
|
| // Only handle notification for the identical auth info.
|
| if (*login_details->handler()->auth_info() != *auth_info())
|
| return;
|
|
|