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

Unified Diff: chrome/browser/ui/login/login_prompt.cc

Issue 8305004: Fix HTTP auth multi-profile handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix Created 9 years, 1 month 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 | « chrome/browser/ui/login/login_prompt.h ('k') | chrome/browser/ui/login/login_prompt_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56515faa039aeb1738bb820f8f11a659f15e5d68..d8f2260879518fceb17239cbf5626c716ee5d2d0 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -25,7 +25,9 @@
#include "grit/generated_resources.h"
#include "net/base/auth.h"
#include "net/base/net_util.h"
+#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_context.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/text/text_elider.h"
@@ -79,6 +81,8 @@ LoginHandler::LoginHandler(net::AuthChallengeInfo* auth_info,
dialog_(NULL),
auth_info_(auth_info),
request_(request),
+ http_network_session_(
+ request_->context()->http_transaction_factory()->GetSession()),
password_manager_(NULL),
login_model_(NULL) {
// This constructor is called on the I/O thread, so we cannot load the nib
@@ -239,6 +243,11 @@ void LoginHandler::Observe(int type,
if (!login_details->handler()->auth_info()->Equals(*auth_info()))
return;
+ // Ignore login notification events from other profiles.
+ if (login_details->handler()->http_network_session_ !=
+ http_network_session_)
+ return;
+
// Set or cancel the auth in this handler.
if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) {
AuthSuppliedLoginNotificationDetails* supplied_details =
« no previous file with comments | « chrome/browser/ui/login/login_prompt.h ('k') | chrome/browser/ui/login/login_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698