Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: components/password_manager/content/browser/credential_manager_dispatcher.h

Issue 886793002: Credential Manager: Introduce PendingRequestTask. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notifysignedout
Patch Set: Feedback. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/password_manager/content/browser/credential_manager_dispatcher.h
diff --git a/components/password_manager/content/browser/credential_manager_dispatcher.h b/components/password_manager/content/browser/credential_manager_dispatcher.h
index 813fa9814204a3b0345d0c902bff2c6372a61e23..1d456f2e447433453e437d203c65b96dd8cd4b8d 100644
--- a/components/password_manager/content/browser/credential_manager_dispatcher.h
+++ b/components/password_manager/content/browser/credential_manager_dispatcher.h
@@ -30,8 +30,7 @@ class PasswordManagerDriver;
class PasswordStore;
struct CredentialInfo;
-class CredentialManagerDispatcher : public content::WebContentsObserver,
- public PasswordStoreConsumer {
+class CredentialManagerDispatcher : public content::WebContentsObserver {
public:
CredentialManagerDispatcher(content::WebContents* web_contents,
PasswordManagerClient* client);
@@ -62,15 +61,13 @@ class CredentialManagerDispatcher : public content::WebContentsObserver,
// content::WebContentsObserver implementation.
bool OnMessageReceived(const IPC::Message& message) override;
- // PasswordStoreConsumer implementation.
- void OnGetPasswordStoreResults(
- const std::vector<autofill::PasswordForm*>& results) override;
-
using CredentialCallback =
base::Callback<void(const autofill::PasswordForm&)>;
+ PasswordManagerClient* client() const { return client_; }
+
private:
- struct PendingRequestParameters;
+ class PendingRequestTask;
PasswordStore* GetPasswordStore();
@@ -87,9 +84,10 @@ class CredentialManagerDispatcher : public content::WebContentsObserver,
scoped_ptr<CredentialManagerPasswordFormManager> form_manager_;
// When 'OnRequestCredential' is called, it in turn calls out to the
- // PasswordStore; we store request details here in order to properly
- // respond to the request once the PasswordStore gives us data.
- scoped_ptr<PendingRequestParameters> pending_request_;
+ // PasswordStore; we push enough data into Pending*Task objects so that
+ // they can properly respond to the request once the PasswordStore gives
+ // us data.
+ scoped_ptr<PendingRequestTask> pending_request_;
DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher);
};

Powered by Google App Engine
This is Rietveld 408576698