Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 void UpdatePasswordLists(); | 39 void UpdatePasswordLists(); |
| 40 | 40 |
| 41 void Initialize(); | 41 void Initialize(); |
| 42 | 42 |
| 43 // Gets the password entry at |index|. | 43 // Gets the password entry at |index|. |
| 44 const autofill::PasswordForm* GetPassword(size_t index); | 44 const autofill::PasswordForm* GetPassword(size_t index); |
| 45 | 45 |
| 46 // Gets the password exception entry at |index|. | 46 // Gets the password exception entry at |index|. |
| 47 const autofill::PasswordForm* GetPasswordException(size_t index); | 47 const autofill::PasswordForm* GetPasswordException(size_t index); |
| 48 | 48 |
| 49 // Checks if |origin| is valid for adding a new password entry. | |
| 50 static bool CheckOriginValidityForAdding(const GURL& origin); | |
| 51 | |
| 52 // Adds a new password entry with |origin|, |username_value|, and | |
| 53 // |password_value|. | |
| 54 void AddPassword(const GURL& origin, | |
|
vabr (Chromium)
2014/08/25 07:35:07
Please document restrictions on |origin| and |pass
jaekyeom
2014/08/26 05:34:48
Done.
| |
| 55 const base::string16& username_value, | |
| 56 const base::string16& password_value); | |
| 57 | |
| 58 // Updates the entry at |index| with |password_value|. | |
| 59 void UpdatePassword(size_t index, const base::string16& password_value); | |
|
vabr (Chromium)
2014/08/25 07:35:07
Please document restrictions on |password_value| (
jaekyeom
2014/08/26 05:34:48
Done.
| |
| 60 | |
| 49 // Removes the saved password entry at |index|. | 61 // Removes the saved password entry at |index|. |
| 50 // |index| the entry index to be removed. | 62 // |index| the entry index to be removed. |
| 51 void RemoveSavedPassword(size_t index); | 63 void RemoveSavedPassword(size_t index); |
| 52 | 64 |
| 53 // Removes the saved password exception entry at |index|. | 65 // Removes the saved password exception entry at |index|. |
| 54 // |index| the entry index to be removed. | 66 // |index| the entry index to be removed. |
| 55 void RemovePasswordException(size_t index); | 67 void RemovePasswordException(size_t index); |
| 56 | 68 |
| 57 // Requests the plain text password for entry at |index| to be revealed. | 69 // Requests the plain text password for entry at |index| to be revealed. |
| 58 // |index| The index of the entry. | 70 // |index| The index of the entry. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 // Used to determine whether or not to reveal plaintext passwords. | 141 // Used to determine whether or not to reveal plaintext passwords. |
| 130 base::TimeTicks last_authentication_time_; | 142 base::TimeTicks last_authentication_time_; |
| 131 | 143 |
| 132 // UI view that owns this presenter. | 144 // UI view that owns this presenter. |
| 133 PasswordUIView* password_view_; | 145 PasswordUIView* password_view_; |
| 134 | 146 |
| 135 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); | 147 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); |
| 136 }; | 148 }; |
| 137 | 149 |
| 138 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 150 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| OLD | NEW |