| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // A short class to mediate requests to the password store for passwordlist. | 88 // A short class to mediate requests to the password store for passwordlist. |
| 89 class PasswordListPopulater : public ListPopulater { | 89 class PasswordListPopulater : public ListPopulater { |
| 90 public: | 90 public: |
| 91 explicit PasswordListPopulater(PasswordManagerPresenter* page); | 91 explicit PasswordListPopulater(PasswordManagerPresenter* page); |
| 92 | 92 |
| 93 // Send a query to the password store to populate a password list. | 93 // Send a query to the password store to populate a password list. |
| 94 void Populate() override; | 94 void Populate() override; |
| 95 | 95 |
| 96 // Send the password store's reply back to the handler. | 96 // Send the password store's reply back to the handler. |
| 97 void OnGetPasswordStoreResults( | 97 void OnGetPasswordStoreResults( |
| 98 const std::vector<autofill::PasswordForm*>& results) override; | 98 ScopedVector<autofill::PasswordForm> results) override; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 // A short class to mediate requests to the password store for exceptions. | 101 // A short class to mediate requests to the password store for exceptions. |
| 102 class PasswordExceptionListPopulater : public ListPopulater { | 102 class PasswordExceptionListPopulater : public ListPopulater { |
| 103 public: | 103 public: |
| 104 explicit PasswordExceptionListPopulater(PasswordManagerPresenter* page); | 104 explicit PasswordExceptionListPopulater(PasswordManagerPresenter* page); |
| 105 | 105 |
| 106 // Send a query to the password store to populate a passwordException list. | 106 // Send a query to the password store to populate a passwordException list. |
| 107 void Populate() override; | 107 void Populate() override; |
| 108 | 108 |
| 109 // Send the password store's reply back to the handler. | 109 // Send the password store's reply back to the handler. |
| 110 void OnGetPasswordStoreResults( | 110 void OnGetPasswordStoreResults( |
| 111 const std::vector<autofill::PasswordForm*>& results) override; | 111 ScopedVector<autofill::PasswordForm> results) override; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 // Password store consumer for populating the password list and exceptions. | 114 // Password store consumer for populating the password list and exceptions. |
| 115 PasswordListPopulater populater_; | 115 PasswordListPopulater populater_; |
| 116 PasswordExceptionListPopulater exception_populater_; | 116 PasswordExceptionListPopulater exception_populater_; |
| 117 | 117 |
| 118 ScopedVector<autofill::PasswordForm> password_list_; | 118 ScopedVector<autofill::PasswordForm> password_list_; |
| 119 ScopedVector<autofill::PasswordForm> password_exception_list_; | 119 ScopedVector<autofill::PasswordForm> password_exception_list_; |
| 120 | 120 |
| 121 // Whether to show stored passwords or not. | 121 // Whether to show stored passwords or not. |
| 122 BooleanPrefMember show_passwords_; | 122 BooleanPrefMember show_passwords_; |
| 123 | 123 |
| 124 // Indicates whether or not the password manager should require the user to | 124 // Indicates whether or not the password manager should require the user to |
| 125 // reauthenticate before revealing plaintext passwords. | 125 // reauthenticate before revealing plaintext passwords. |
| 126 bool require_reauthentication_; | 126 bool require_reauthentication_; |
| 127 | 127 |
| 128 // The last time the user was successfully authenticated. | 128 // The last time the user was successfully authenticated. |
| 129 // Used to determine whether or not to reveal plaintext passwords. | 129 // Used to determine whether or not to reveal plaintext passwords. |
| 130 base::TimeTicks last_authentication_time_; | 130 base::TimeTicks last_authentication_time_; |
| 131 | 131 |
| 132 // UI view that owns this presenter. | 132 // UI view that owns this presenter. |
| 133 PasswordUIView* password_view_; | 133 PasswordUIView* password_view_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); | 135 DISALLOW_COPY_AND_ASSIGN(PasswordManagerPresenter); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ | 138 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_ |
| OLD | NEW |