summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 00:25:04 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-23 00:25:04 +0000
commitcb5b58c021e7fbcf3f377697870401cdd159ff6d (patch)
tree48e4845d5c8f984765a869f085eefd1d2fc5d2ed /chrome/browser/automation
parent4225cbbd34cb72a87dc24be6e87537ba8c1b8505 (diff)
downloadchromium_src-cb5b58c021e7fbcf3f377697870401cdd159ff6d.zip
chromium_src-cb5b58c021e7fbcf3f377697870401cdd159ff6d.tar.gz
chromium_src-cb5b58c021e7fbcf3f377697870401cdd159ff6d.tar.bz2
Revert 36888 - Refactored code to allow associating workers with multiple renderers.
SharedWorkers now gracefully handle http auth requests after their initial window has closed. BUG=27660 TEST=WorkerHttpAuth,SharedWorkerHttpAuth uitests Review URL: http://codereview.chromium.org/509016 TBR=atwilson@chromium.org Review URL: http://codereview.chromium.org/549138 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index dfea17c..03039b1 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -174,16 +174,18 @@ void NavigationNotificationObserver::Observe(
// occur while authentication is ongoing.
navigation_started_ = true;
} else if (type == NotificationType::AUTH_NEEDED) {
- // 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);
+ 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();
+ }
} else {
NOTREACHED();
}