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

Side by Side Diff: chrome/browser/password_manager/password_manager.h

Issue 152693003: Expose PasswordManagerDriver as a public interface to core Password code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 10 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 | Annotate | Revision Log
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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/prefs/pref_member.h" 14 #include "base/prefs/pref_member.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "chrome/browser/password_manager/password_form_manager.h" 16 #include "chrome/browser/password_manager/password_form_manager.h"
17 #include "chrome/browser/ui/login/login_model.h" 17 #include "chrome/browser/ui/login/login_model.h"
18 #include "components/autofill/core/common/password_form.h" 18 #include "components/autofill/core/common/password_form.h"
19 #include "components/autofill/core/common/password_form_fill_data.h" 19 #include "components/autofill/core/common/password_form_fill_data.h"
20 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
21 #include "content/public/browser/web_contents_user_data.h" 21 #include "content/public/browser/web_contents_user_data.h"
22 22
23 class PasswordManagerDelegate; 23 class PasswordManagerDelegate;
24 class PasswordManagerDriver;
24 class PasswordManagerTest; 25 class PasswordManagerTest;
25 class PasswordFormManager; 26 class PasswordFormManager;
26 class PrefRegistrySimple; 27 class PrefRegistrySimple;
27 28
28 namespace user_prefs { 29 namespace user_prefs {
29 class PrefRegistrySyncable; 30 class PrefRegistrySyncable;
30 } 31 }
31 32
32 // Per-tab password manager. Handles creation and management of UI elements, 33 // Per-tab password manager. Handles creation and management of UI elements,
33 // receiving password form data from the renderer and managing the password 34 // receiving password form data from the renderer and managing the password
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ScopedVector<PasswordFormManager> pending_login_managers_; 156 ScopedVector<PasswordFormManager> pending_login_managers_;
156 157
157 // When the user submits a password/credential, this contains the 158 // When the user submits a password/credential, this contains the
158 // PasswordFormManager for the form in question until we deem the login 159 // PasswordFormManager for the form in question until we deem the login
159 // attempt to have succeeded (as in valid credentials). If it fails, we 160 // attempt to have succeeded (as in valid credentials). If it fails, we
160 // send the PasswordFormManager back to the pending_login_managers_ set. 161 // send the PasswordFormManager back to the pending_login_managers_ set.
161 // Scoped in case PasswordManager gets deleted (e.g tab closes) between the 162 // Scoped in case PasswordManager gets deleted (e.g tab closes) between the
162 // time a user submits a login form and gets to the next page. 163 // time a user submits a login form and gets to the next page.
163 scoped_ptr<PasswordFormManager> provisional_save_manager_; 164 scoped_ptr<PasswordFormManager> provisional_save_manager_;
164 165
165 // Our delegate for carrying out external operations. This is typically the 166 // The embedder-level client. Must outlive this class.
166 // containing WebContents.
167 PasswordManagerDelegate* const delegate_; 167 PasswordManagerDelegate* const delegate_;
168 168
169 // The platform-level driver. Must outlive this class.
170 PasswordManagerDriver* const driver_;
171
169 // Set to false to disable the password manager (will no longer ask if you 172 // Set to false to disable the password manager (will no longer ask if you
170 // want to save passwords but will continue to fill passwords). 173 // want to save passwords but will continue to fill passwords).
171 BooleanPrefMember password_manager_enabled_; 174 BooleanPrefMember password_manager_enabled_;
172 175
173 // Observers to be notified of LoginModel events. This is mutable to allow 176 // Observers to be notified of LoginModel events. This is mutable to allow
174 // notification in const member functions. 177 // notification in const member functions.
175 mutable ObserverList<LoginModelObserver> observers_; 178 mutable ObserverList<LoginModelObserver> observers_;
176 179
177 // Callbacks to be notified when a password form has been submitted. 180 // Callbacks to be notified when a password form has been submitted.
178 std::vector<PasswordSubmittedCallback> submission_callbacks_; 181 std::vector<PasswordSubmittedCallback> submission_callbacks_;
179 182
180 DISALLOW_COPY_AND_ASSIGN(PasswordManager); 183 DISALLOW_COPY_AND_ASSIGN(PasswordManager);
181 }; 184 };
182 185
183 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ 186 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_form_manager_unittest.cc ('k') | chrome/browser/password_manager/password_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698