| Index: chrome/browser/dom_ui/passwords_exceptions_handler.h
|
| diff --git a/chrome/browser/dom_ui/passwords_exceptions_handler.h b/chrome/browser/dom_ui/passwords_exceptions_handler.h
|
| index 4bc87e84193896ca8a4645ca7c75af007408aa5e..f4bfe4b466134380b3a9b813d9ead5b104808d48 100644
|
| --- a/chrome/browser/dom_ui/passwords_exceptions_handler.h
|
| +++ b/chrome/browser/dom_ui/passwords_exceptions_handler.h
|
| @@ -26,46 +26,93 @@ class PasswordsExceptionsHandler : public OptionsPageUIHandler {
|
| PasswordStore* GetPasswordStore();
|
|
|
| // Fired when user clicks 'show saved passwords' button in personal page.
|
| - void LoadSavedPasswords(const ListValue* args);
|
| + void LoadLists(const ListValue* args);
|
|
|
| // Remove an entry.
|
| // @param value the entry index to be removed.
|
| - void RemoveEntry(const ListValue* args);
|
| + void RemoveSavedPassword(const ListValue* args);
|
| +
|
| + // Remove an password exception.
|
| + // @param value the entry index to be removed.
|
| + void RemovePasswordException(const ListValue* args);
|
| +
|
| + // Remove all saved passwords
|
| + void RemoveAllSavedPasswords(const ListValue* args);
|
| +
|
| + // Remove All password exceptions
|
| + void RemoveAllPasswordExceptions(const ListValue* args);
|
|
|
| // Get password value for the selected entry.
|
| // @param value the selected entry index.
|
| void ShowSelectedPassword(const ListValue* args);
|
|
|
| - // Sets the password list contents to the given data. We take ownership of
|
| - // the PasswordForms in the vector.
|
| + // Sets the password and exception list contents to the given data.
|
| + // We take ownership of the PasswordForms in the vector.
|
| void SetPasswordList();
|
| + void SetPasswordExceptionList();
|
|
|
| // A short class to mediate requests to the password store.
|
| - class PasswordListPopulater : public PasswordStoreConsumer {
|
| + class ListPopulater : public PasswordStoreConsumer {
|
| public:
|
| - explicit PasswordListPopulater(PasswordsExceptionsHandler* page)
|
| + explicit ListPopulater(PasswordsExceptionsHandler* page)
|
| : page_(page),
|
| pending_login_query_(0) {
|
| }
|
|
|
| - // Send a query to the password store to populate a PasswordsPageGtk.
|
| - void Populate();
|
| + // Send a query to the password store to populate a list.
|
| + virtual void Populate() = 0;
|
|
|
| - // Send the password store's reply back to the PasswordsPageGtk.
|
| + // Send the password store's reply back to the handler.
|
| virtual void OnPasswordStoreRequestDone(
|
| - int handle, const std::vector<webkit_glue::PasswordForm*>& result);
|
| + int handle, const std::vector<webkit_glue::PasswordForm*>& result) = 0;
|
|
|
| - private:
|
| + protected:
|
| PasswordsExceptionsHandler* page_;
|
| int pending_login_query_;
|
| };
|
|
|
| - // Password store consumer for populating the password list.
|
| + // A short class to mediate requests to the password store for passwordlist.
|
| + class PasswordListPopulater : public ListPopulater {
|
| + public:
|
| + explicit PasswordListPopulater(PasswordsExceptionsHandler* page)
|
| + : ListPopulater(page) {
|
| + }
|
| +
|
| + // Send a query to the password store to populate a password list.
|
| + virtual void Populate();
|
| +
|
| + // Send the password store's reply back to the handler.
|
| + virtual void OnPasswordStoreRequestDone(
|
| + int handle, const std::vector<webkit_glue::PasswordForm*>& result);
|
| + };
|
| +
|
| + // A short class to mediate requests to the password store for exceptions.
|
| + class PasswordExceptionListPopulater : public ListPopulater {
|
| + public:
|
| + explicit PasswordExceptionListPopulater(
|
| + PasswordsExceptionsHandler* page) : ListPopulater(page) {
|
| + }
|
| +
|
| + // Send a query to the password store to populate a passwordException list.
|
| + virtual void Populate();
|
| +
|
| + // Send the password store's reply back to the handler.
|
| + virtual void OnPasswordStoreRequestDone(
|
| + int handle, const std::vector<webkit_glue::PasswordForm*>& result);
|
| + };
|
| +
|
| + // Password store consumer for populating the password list and exceptions.
|
| PasswordListPopulater populater_;
|
| + PasswordExceptionListPopulater exception_populater_;
|
| +
|
| + std::vector<webkit_glue::PasswordForm*> password_list_;
|
| + std::vector<webkit_glue::PasswordForm*> password_exception_list_;
|
|
|
| // A weak reference to profile.
|
| Profile* profile_;
|
| - std::vector<webkit_glue::PasswordForm*> password_list_;
|
| +
|
| + // User's pref
|
| + std::wstring languages_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PasswordsExceptionsHandler);
|
| };
|
|
|