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

Unified Diff: components/password_manager/core/browser/login_model.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: components/password_manager/core/browser/login_model.cc
diff --git a/components/password_manager/core/browser/login_model.cc b/components/password_manager/core/browser/login_model.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a2bf7126e9dfe42100cef5d80e465b64c2e67bf5
--- /dev/null
+++ b/components/password_manager/core/browser/login_model.cc
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/password_manager/core/browser/login_model.h"
+
+namespace password_manager {
+
+LoginModelObserver::LoginModelObserver() {}
+
+LoginModelObserver::~LoginModelObserver() {}
+
+void LoginModelObserver::OnAutofillDataAvailable(
+ const autofill::PasswordForm& credentials) {
+ DCHECK(!signon_realm_.empty())
+ << "The model did not call set_signon_realm properly.";
+
+ if (credentials.signon_realm == signon_realm_) {
+ OnAutofillDataAvailableInternal(credentials.username_value,
+ credentials.password_value);
+ }
+}
+
+LoginModel::LoginModel() {}
+LoginModel::~LoginModel() {}
+
+} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698