Index: chrome/browser/ui/passwords/password_manager_presenter.h |
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.h b/chrome/browser/ui/passwords/password_manager_presenter.h |
index 2729cff667b0dba1f30a4415a7fec7aad3a20aff..267f31707bf2a31bd5ca1b7aeb1d531e62337697 100644 |
--- a/chrome/browser/ui/passwords/password_manager_presenter.h |
+++ b/chrome/browser/ui/passwords/password_manager_presenter.h |
@@ -17,6 +17,7 @@ |
#include "components/password_manager/core/browser/password_store.h" |
#include "components/password_manager/core/browser/password_store_consumer.h" |
#include "components/prefs/pref_member.h" |
+#include "ui/shell_dialogs/select_file_dialog.h" |
namespace autofill { |
struct PasswordForm; |
@@ -52,6 +53,9 @@ class PasswordManagerPresenter |
// Gets the password entry at |index|. |
const autofill::PasswordForm* GetPassword(size_t index); |
+ // Gets all password entries. |
+ std::vector<std::unique_ptr<autofill::PasswordForm>> GetAllPasswords(); |
+ |
// Gets the password exception entry at |index|. |
const autofill::PasswordForm* GetPasswordException(size_t index); |
@@ -67,11 +71,15 @@ class PasswordManagerPresenter |
// |index| The index of the entry. |
void RequestShowPassword(size_t index); |
+ // Returns true if the user is authenticated. |
+ virtual bool IsUserAuthenticated(); |
+ |
private: |
friend class PasswordManagerPresenterTest; |
- // Returns the password store associated with the currently active profile. |
- password_manager::PasswordStore* GetPasswordStore(); |
+ // Returns true if the user needs to be authenticated before a plaintext |
+ // password is revealed or exported. |
+ bool IsAuthenticationRequired(); |
// Sets the password and exception list of the UI view. |
void SetPasswordList(); |
@@ -88,6 +96,9 @@ class PasswordManagerPresenter |
DuplicatesMap* duplicates, |
bool username_and_password_in_key); |
+ // Returns the password store associated with the currently active profile. |
+ password_manager::PasswordStore* GetPasswordStore(); |
+ |
// A short class to mediate requests to the password store. |
class ListPopulater : public password_manager::PasswordStoreConsumer { |
public: |
@@ -136,6 +147,9 @@ class PasswordManagerPresenter |
DuplicatesMap password_duplicates_; |
DuplicatesMap password_exception_duplicates_; |
+ // Whether to show stored passwords or not. |
+ BooleanPrefMember show_passwords_; |
+ |
// The last time the user was successfully authenticated. |
// Used to determine whether or not to reveal plaintext passwords. |
base::TimeTicks last_authentication_time_; |