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

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

Issue 1384283003: Do not involve PasswordManagerDriver in filling HTTP-auth forms; also check realm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete with new tests Created 5 years, 2 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
Index: chrome/browser/ui/login/login_prompt.h
diff --git a/chrome/browser/ui/login/login_prompt.h b/chrome/browser/ui/login/login_prompt.h
index 9f58dcdba547651299d9df5aea62b68be2ada2b8..ddebac0c876ee586dc8abe1a305cfe0a6feb7b66 100644
--- a/chrome/browser/ui/login/login_prompt.h
+++ b/chrome/browser/ui/login/login_prompt.h
@@ -48,10 +48,14 @@ class LoginHandler : public content::ResourceDispatcherHostLoginDelegate,
// ResourceDispatcherHostLoginDelegate implementation:
void OnRequestCancelled() override;
- // Initializes the underlying platform specific view.
+ // Initializes the underlying platform specific view. If |manager| is not
+ // null, then also |observed_form| must not be null; in that case |manager| is
+ // used to retrieve stored credentials matching |observed_form| and fill them
+ // in the login prompt.
virtual void BuildViewForPasswordManager(
password_manager::PasswordManager* manager,
- const base::string16& explanation) = 0;
+ const base::string16& explanation,
+ const autofill::PasswordForm* observed_form) = 0;
Peter Kasting 2015/10/06 22:14:49 I can't say I love the pervasive DCHECK_EQ(mana
vabr (Chromium) 2015/10/07 10:29:22 You raise a good point. I attempted to solve this
// Sets information about the authentication type (|form|) and the
// |password_manager| for this profile.
@@ -61,9 +65,8 @@ class LoginHandler : public content::ResourceDispatcherHostLoginDelegate,
// Returns the WebContents that needs authentication.
content::WebContents* GetWebContentsForLogin() const;
- // Returns the PasswordManager for the render frame that needs login.
- password_manager::ContentPasswordManagerDriver*
- GetPasswordManagerDriverForLogin();
+ // Returns the PasswordManager for the web contents that needs login.
+ password_manager::PasswordManager* GetPasswordManagerForLogin();
// Resend the request with authentication credentials.
// This function can be called from either thread.
@@ -90,7 +93,8 @@ class LoginHandler : public content::ResourceDispatcherHostLoginDelegate,
protected:
~LoginHandler() override;
- void SetModel(password_manager::LoginModel* model);
+ void SetModel(password_manager::LoginModel* model,
+ const autofill::PasswordForm* observed_form);
// Notify observers that authentication is needed.
void NotifyAuthNeeded();

Powered by Google App Engine
This is Rietveld 408576698