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

Side by Side Diff: components/password_manager/core/browser/password_manager.h

Issue 293093002: Don't show "Save password" prompt for a failed login (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Should be called when the user navigates the main frame. 89 // Should be called when the user navigates the main frame.
90 void DidNavigateMainFrame(bool is_in_page); 90 void DidNavigateMainFrame(bool is_in_page);
91 91
92 // Handles password forms being parsed. 92 // Handles password forms being parsed.
93 void OnPasswordFormsParsed( 93 void OnPasswordFormsParsed(
94 const std::vector<autofill::PasswordForm>& forms); 94 const std::vector<autofill::PasswordForm>& forms);
95 95
96 // Handles password forms being rendered. 96 // Handles password forms being rendered.
97 void OnPasswordFormsRendered( 97 void OnPasswordFormsRendered(
98 const std::vector<autofill::PasswordForm>& visible_forms); 98 const std::vector<autofill::PasswordForm>& visible_forms,
99 bool did_stop_loading);
99 100
100 // Handles a password form being submitted. 101 // Handles a password form being submitted.
101 virtual void OnPasswordFormSubmitted( 102 virtual void OnPasswordFormSubmitted(
102 const autofill::PasswordForm& password_form); 103 const autofill::PasswordForm& password_form);
103 104
104 PasswordManagerClient* client() { return client_; } 105 PasswordManagerClient* client() { return client_; }
105 106
106 private: 107 private:
107 enum ProvisionalSaveFailure { 108 enum ProvisionalSaveFailure {
108 SAVING_DISABLED, 109 SAVING_DISABLED,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // want to save passwords but will continue to fill passwords). 182 // want to save passwords but will continue to fill passwords).
182 BooleanPrefMember password_manager_enabled_; 183 BooleanPrefMember password_manager_enabled_;
183 184
184 // Observers to be notified of LoginModel events. This is mutable to allow 185 // Observers to be notified of LoginModel events. This is mutable to allow
185 // notification in const member functions. 186 // notification in const member functions.
186 mutable ObserverList<LoginModelObserver> observers_; 187 mutable ObserverList<LoginModelObserver> observers_;
187 188
188 // Callbacks to be notified when a password form has been submitted. 189 // Callbacks to be notified when a password form has been submitted.
189 std::vector<PasswordSubmittedCallback> submission_callbacks_; 190 std::vector<PasswordSubmittedCallback> submission_callbacks_;
190 191
192 // Records all visible forms seen during a page load, in all frames of the
193 // page. When the page stops loading, the password manager checks if one of
194 // the recorded forms matches the login form from the previous page
195 // (to see if the login was a failure), and clears the vector.
196 std::vector<autofill::PasswordForm> all_visible_forms_;
197
191 DISALLOW_COPY_AND_ASSIGN(PasswordManager); 198 DISALLOW_COPY_AND_ASSIGN(PasswordManager);
192 }; 199 };
193 200
194 } // namespace password_manager 201 } // namespace password_manager
195 202
196 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ 203 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698