OLD | NEW |
---|---|
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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 } | 28 } |
29 | 29 |
30 // Per-tab password manager. Handles creation and management of UI elements, | 30 // Per-tab password manager. Handles creation and management of UI elements, |
31 // receiving password form data from the renderer and managing the password | 31 // receiving password form data from the renderer and managing the password |
32 // database through the PasswordStore. The PasswordManager is a LoginModel | 32 // database through the PasswordStore. The PasswordManager is a LoginModel |
33 // for purposes of supporting HTTP authentication dialogs. | 33 // for purposes of supporting HTTP authentication dialogs. |
34 class PasswordManager : public LoginModel, | 34 class PasswordManager : public LoginModel, |
35 public content::WebContentsObserver, | 35 public content::WebContentsObserver, |
36 public content::WebContentsUserData<PasswordManager> { | 36 public content::WebContentsUserData<PasswordManager> { |
37 public: | 37 public: |
38 enum PotentialInfoBarErrorReasons { | |
39 SPDY_PROXY, | |
40 SAVE_PASSWORD_DISABLE, | |
vabr (Chromium)
2013/08/14 14:39:58
nit: DISABLE->DISABLED ?
| |
41 EMPTY_PASSWORD, | |
42 FIRST_PAGE_NOT_LOADED, | |
43 MATCHING_ONGOING, | |
44 NEVER_REMEMBER, | |
45 INVALID_FORM, | |
46 PASSWORD_GENERATED_OR_AUTOCOMPLETED, | |
47 CANNOT_GET_THE_PROVIOSIONAL_PASSWORD, | |
vabr (Chromium)
2013/08/14 14:39:58
typo: PROVIOSIONAL
| |
48 FORM_REAPPEARED, | |
49 LOGIN_ALREADY_KNEW, | |
vabr (Chromium)
2013/08/14 14:39:58
nit: KNEW->KNOWN ?
| |
50 PASSWORD_GENERATED, | |
vabr (Chromium)
2013/08/14 14:39:58
How does this differ from PASSWORD_GENERATED_OR_AU
| |
51 ORIGIN_MATCHING_OF_PUBLIC_SUFFIX, | |
vabr (Chromium)
2013/08/14 14:39:58
nit: leave out "OF" ?
| |
52 NUM_ERROR_TYPES | |
vabr (Chromium)
2013/08/14 14:39:58
Here I am not sure about the C++ standard -- are w
Garrett Casto
2013/08/14 23:02:47
Yep.
| |
53 }; | |
54 | |
38 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 55 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
39 | 56 |
40 static void CreateForWebContentsAndDelegate( | 57 static void CreateForWebContentsAndDelegate( |
41 content::WebContents* contents, | 58 content::WebContents* contents, |
42 PasswordManagerDelegate* delegate); | 59 PasswordManagerDelegate* delegate); |
43 virtual ~PasswordManager(); | 60 virtual ~PasswordManager(); |
44 | 61 |
45 // Is saving new data for password autofill enabled for the current profile? | 62 // Is saving new data for password autofill enabled for the current profile? |
46 // For example, saving new data is disabled in Incognito mode, whereas filling | 63 // For example, saving new data is disabled in Incognito mode, whereas filling |
47 // data is not. | 64 // data is not. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 BooleanPrefMember password_manager_enabled_; | 156 BooleanPrefMember password_manager_enabled_; |
140 | 157 |
141 // Observers to be notified of LoginModel events. This is mutable to allow | 158 // Observers to be notified of LoginModel events. This is mutable to allow |
142 // notification in const member functions. | 159 // notification in const member functions. |
143 mutable ObserverList<LoginModelObserver> observers_; | 160 mutable ObserverList<LoginModelObserver> observers_; |
144 | 161 |
145 DISALLOW_COPY_AND_ASSIGN(PasswordManager); | 162 DISALLOW_COPY_AND_ASSIGN(PasswordManager); |
146 }; | 163 }; |
147 | 164 |
148 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 165 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
OLD | NEW |