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

Unified Diff: components/password_manager/core/browser/credential_manager_pending_request_task.h

Issue 1866643002: Reland: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 8 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/core/browser/credential_manager_pending_request_task.h
diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.h b/components/password_manager/core/browser/credential_manager_pending_request_task.h
index 61211b2194a8a51a8e8121f5b5a212111f28b389..1cafaf1bd438a60f51e876255797f23b29ff01e9 100644
--- a/components/password_manager/core/browser/credential_manager_pending_request_task.h
+++ b/components/password_manager/core/browser/credential_manager_pending_request_task.h
@@ -24,6 +24,9 @@ namespace password_manager {
struct CredentialInfo;
class PasswordManagerClient;
+typedef base::Callback<void(const CredentialInfo& credential)>
+ SendCredentialCallback;
+
// Sends credentials retrieved from the PasswordStore to CredentialManager API
// clients and retrieves embedder-dependent information.
class CredentialManagerPendingRequestTaskDelegate {
@@ -41,11 +44,13 @@ class CredentialManagerPendingRequestTaskDelegate {
virtual PasswordManagerClient* client() const = 0;
// Sends a credential to JavaScript.
- virtual void SendCredential(int id, const CredentialInfo& credential) = 0;
+ virtual void SendCredential(const SendCredentialCallback& send_callback,
+ const CredentialInfo& credential) = 0;
// Updates |skip_zero_click| for |form| in the PasswordStore if required.
// Sends a credential to JavaScript.
- virtual void SendPasswordForm(int id, const autofill::PasswordForm* form) = 0;
+ virtual void SendPasswordForm(const SendCredentialCallback& send_callback,
+ const autofill::PasswordForm* form) = 0;
};
// Retrieves credentials from the PasswordStore.
@@ -53,7 +58,7 @@ class CredentialManagerPendingRequestTask : public PasswordStoreConsumer {
public:
CredentialManagerPendingRequestTask(
CredentialManagerPendingRequestTaskDelegate* delegate,
- int request_id,
+ const SendCredentialCallback& callback,
bool request_zero_click_only,
const GURL& request_origin,
bool include_passwords,
@@ -61,7 +66,7 @@ class CredentialManagerPendingRequestTask : public PasswordStoreConsumer {
const std::vector<std::string>& affiliated_realms);
~CredentialManagerPendingRequestTask() override;
- int id() const { return id_; }
+ SendCredentialCallback send_callback() const { return send_callback_; }
const GURL& origin() const { return origin_; }
// PasswordStoreConsumer implementation.
@@ -70,7 +75,7 @@ class CredentialManagerPendingRequestTask : public PasswordStoreConsumer {
private:
CredentialManagerPendingRequestTaskDelegate* delegate_; // Weak;
- const int id_;
+ SendCredentialCallback send_callback_;
const bool zero_click_only_;
const GURL origin_;
const bool include_passwords_;

Powered by Google App Engine
This is Rietveld 408576698