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 25 matching lines...) Expand all Loading... | |
| 36 const password_manager::PasswordStoreChangeList& changes) override; | 36 const password_manager::PasswordStoreChangeList& changes) override; |
| 37 | 37 |
| 38 // Repopulates the password and exception entries. | 38 // Repopulates the password and exception entries. |
| 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 all password entries. | |
| 47 ScopedVector<autofill::PasswordForm> GetAllPasswords(); | |
| 48 | |
| 46 // Gets the password exception entry at |index|. | 49 // Gets the password exception entry at |index|. |
| 47 const autofill::PasswordForm* GetPasswordException(size_t index); | 50 const autofill::PasswordForm* GetPasswordException(size_t index); |
| 48 | 51 |
| 49 // Removes the saved password entry at |index|. | 52 // Removes the saved password entry at |index|. |
| 50 // |index| the entry index to be removed. | 53 // |index| the entry index to be removed. |
| 51 void RemoveSavedPassword(size_t index); | 54 void RemoveSavedPassword(size_t index); |
| 52 | 55 |
| 56 // Add password forms in |forms| to PasswordStore, return true if succeed. | |
|
vabr (Chromium)
2015/07/06 08:57:16
nit: "if succeed" -> "on success"
xunlu
2015/07/07 00:46:03
Done.
| |
| 57 virtual bool AddPasswordsToStore( | |
|
vabr (Chromium)
2015/07/06 08:57:16
There is something fishy about this method -- it d
xunlu
2015/07/07 00:46:03
Done.
| |
| 58 const std::vector<autofill::PasswordForm>& forms); | |
| 59 | |
| 53 // Removes the saved password exception entry at |index|. | 60 // Removes the saved password exception entry at |index|. |
| 54 // |index| the entry index to be removed. | 61 // |index| the entry index to be removed. |
| 55 void RemovePasswordException(size_t index); | 62 void RemovePasswordException(size_t index); |
| 56 | 63 |
| 57 // Requests the plain text password for entry at |index| to be revealed. | 64 // Requests the plain text password for entry at |index| to be revealed. |
| 58 // |index| The index of the entry. | 65 // |index| The index of the entry. |
| 59 void RequestShowPassword(size_t index); | 66 void RequestShowPassword(size_t index); |
| 60 | 67 |
| 68 // Request passwords in |password_list_| to be exported. Return true if | |
|
vabr (Chromium)
2015/07/06 08:57:16
nit: Could you please make it clearer who/what dec
xunlu
2015/07/07 00:46:03
Done.
| |
| 69 // request granted. | |
| 70 virtual bool RequestToExportPassword(); | |
| 71 | |
| 61 private: | 72 private: |
| 62 friend class PasswordManagerPresenterTest; | 73 friend class PasswordManagerPresenterTest; |
| 63 | 74 |
| 64 // Returns the password store associated with the currently active profile. | 75 // Returns the password store associated with the currently active profile. |
| 65 password_manager::PasswordStore* GetPasswordStore(); | 76 password_manager::PasswordStore* GetPasswordStore(); |
| 66 | 77 |
| 67 // Returns true if the user needs to be authenticated before a plaintext | 78 // Returns true if the user needs to be authenticated before a plaintext |
| 68 // password is revealed. | 79 // password is revealed. |
| 69 bool IsAuthenticationRequired(); | 80 bool IsAuthenticationRequired(); |
| 70 | 81 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 // UI view that owns this presenter. | 143 // UI view that owns this presenter. |
| 133 PasswordUIView* password_view_; | 144 PasswordUIView* password_view_; |
| 134 | 145 |
| 135 // User pref for storing accept languages. | 146 // User pref for storing accept languages. |
| 136 std::string languages_; | 147 std::string languages_; |
| 137 | 148 |
| 138 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); | 149 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); |
| 139 }; | 150 }; |
| 140 | 151 |
| 141 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 152 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| OLD | NEW |