| 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 66d071ee3ba95e21730ddad1236db7629d9f40fb..91d7bcbcc6eb85492b156203f0bd688e502e91ce 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;
|
| @@ -25,7 +26,6 @@ struct PasswordForm;
|
| // Multimap from sort key to password forms.
|
| using DuplicatesMap =
|
| std::multimap<std::string, scoped_ptr<autofill::PasswordForm>>;
|
| -
|
| class PasswordUIView;
|
|
|
| class Profile;
|
| @@ -52,6 +52,9 @@ class PasswordManagerPresenter
|
| // Gets the password entry at |index|.
|
| const autofill::PasswordForm* GetPassword(size_t index);
|
|
|
| + // Gets all password entries.
|
| + std::vector<scoped_ptr<autofill::PasswordForm>> GetAllPasswords();
|
| +
|
| // Gets the password exception entry at |index|.
|
| const autofill::PasswordForm* GetPasswordException(size_t index);
|
|
|
| @@ -67,11 +70,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 +95,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 +146,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_;
|
|
|