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

Unified Diff: chrome/browser/ui/views/login_view.cc

Issue 1421013003: [Merge in M47] Do not involve PasswordManagerDriver in filling HTTP-auth forms; also check realm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: 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/views/login_view.cc
diff --git a/chrome/browser/ui/views/login_view.cc b/chrome/browser/ui/views/login_view.cc
index 50f697a6291db4e32aa1cad15b75a9fd902969a9..78768e7fe0b91423630c791cb190967307fcc8be 100644
--- a/chrome/browser/ui/views/login_view.cc
+++ b/chrome/browser/ui/views/login_view.cc
@@ -21,7 +21,7 @@ using views::GridLayout;
// LoginView, public:
LoginView::LoginView(const base::string16& explanation,
- LoginModel* model)
+ LoginHandler::LoginModelData* login_model_data)
: username_field_(new views::Textfield()),
password_field_(new views::Textfield()),
username_label_(new views::Label(
@@ -29,7 +29,7 @@ LoginView::LoginView(const base::string16& explanation,
password_label_(new views::Label(
l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_PASSWORD_FIELD))),
message_label_(new views::Label(explanation)),
- login_model_(model) {
+ login_model_(login_model_data ? login_model_data->model : nullptr) {
password_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
message_label_->SetMultiLine(true);
message_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
@@ -75,8 +75,10 @@ LoginView::LoginView(const base::string16& explanation,
layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
- if (login_model_)
- login_model_->AddObserver(this);
+ if (login_model_data) {
+ login_model_->AddObserverAndDeliverCredentials(this,
+ login_model_data->form);
+ }
}
LoginView::~LoginView() {
@@ -99,8 +101,9 @@ views::View* LoginView::GetInitiallyFocusedView() {
///////////////////////////////////////////////////////////////////////////////
// LoginView, views::View, password_manager::LoginModelObserver overrides:
-void LoginView::OnAutofillDataAvailable(const base::string16& username,
- const base::string16& password) {
+void LoginView::OnAutofillDataAvailableInternal(
+ const base::string16& username,
+ const base::string16& password) {
if (username_field_->text().empty()) {
username_field_->SetText(username);
password_field_->SetText(password);
« no previous file with comments | « chrome/browser/ui/views/login_view.h ('k') | components/autofill/core/common/save_password_progress_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698