| Index: chrome/browser/extensions/api/passwords_private/passwords_private_api.h
|
| diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_api.h b/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
|
| index 4cef1917f65877cd7aac77e2b9afeac96a7b7e94..2380b58996fa076fd1c506d6b6de489cda69f8e7 100644
|
| --- a/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
|
| +++ b/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
|
| @@ -8,6 +8,8 @@
|
| #include <string>
|
|
|
| #include "base/macros.h"
|
| +#include "chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h"
|
| +#include "chrome/browser/ui/passwords/password_manager_presenter.h"
|
| #include "extensions/browser/extension_function.h"
|
|
|
| namespace extensions {
|
| @@ -66,8 +68,8 @@ class PasswordsPrivateRemovePasswordExceptionFunction :
|
| class PasswordsPrivateGetPlaintextPasswordFunction :
|
| public UIThreadExtensionFunction {
|
| public:
|
| - PasswordsPrivateGetPlaintextPasswordFunction() {}
|
| - DECLARE_EXTENSION_FUNCTION("passwordsPrivate.GetPlaintextPassword",
|
| + PasswordsPrivateGetPlaintextPasswordFunction();
|
| + DECLARE_EXTENSION_FUNCTION("passwordsPrivate.getPlaintextPassword",
|
| PASSWORDSPRIVATE_GETPLAINTEXTPASSWORD);
|
|
|
| protected:
|
| @@ -77,6 +79,17 @@ class PasswordsPrivateGetPlaintextPasswordFunction :
|
| ResponseAction Run() override;
|
|
|
| private:
|
| + // Called by the observer when the password has been retrieved so that this
|
| + // function can return the password value.
|
| + void ReplyWithPlaintextPassword(const std::string& plaintext_password);
|
| +
|
| + // Observer used by PasswordsPrivateGetPlaintextPasswordFunction to listen
|
| + // for when PasswordsPrivateDelegate fetches the requested plaintext
|
| + // password.
|
| + class PlaintextPasswordObserver;
|
| +
|
| + PlaintextPasswordObserver* observer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateGetPlaintextPasswordFunction);
|
| };
|
|
|
|
|