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

Unified Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 509016: Refactored code to allow associating workers with multiple renderers. (Closed)
Patch Set: Disabled overly-aggressive assertion in ResourceDispatcherHost. Created 10 years, 11 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 | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 03039b1c0750a35361b56da5fa622b7d73016770..dfea17c8b4432a525a26c874a351a56bfb025b75 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -174,18 +174,16 @@ void NavigationNotificationObserver::Observe(
// occur while authentication is ongoing.
navigation_started_ = true;
} else if (type == NotificationType::AUTH_NEEDED) {
- if (navigation_started_) {
- // Remember the login handler that wants authentication.
- LoginHandler* handler =
- Details<LoginNotificationDetails>(details)->handler();
- automation_->AddLoginHandler(controller_, handler);
-
- // Respond that authentication is needed.
- navigation_started_ = false;
- ConditionMet(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED);
- } else {
- NOTREACHED();
- }
+ // Remember the login handler that wants authentication.
+ // We do this in all cases (not just when navigation_started_ == true) so
+ // tests can still wait for auth dialogs outside of navigation.
+ LoginHandler* handler =
+ Details<LoginNotificationDetails>(details)->handler();
+ automation_->AddLoginHandler(controller_, handler);
+
+ // Respond that authentication is needed.
+ navigation_started_ = false;
+ ConditionMet(AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED);
} else {
NOTREACHED();
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698