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

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

Issue 1762603002: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add browsertests. Created 4 years, 9 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.cc
diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.cc b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
index 3d83f49685559e04275d39187e7dba521130914e..ebf18e119a7ff25c3f1f4575bfa9045081f7d866 100644
--- a/components/password_manager/core/browser/credential_manager_pending_request_task.cc
+++ b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
@@ -19,14 +19,14 @@ namespace password_manager {
CredentialManagerPendingRequestTask::CredentialManagerPendingRequestTask(
CredentialManagerPendingRequestTaskDelegate* delegate,
- int request_id,
+ const SendCredentialCallback& callback,
bool request_zero_click_only,
const GURL& request_origin,
bool include_passwords,
const std::vector<GURL>& request_federations,
const std::vector<std::string>& affiliated_realms)
: delegate_(delegate),
- id_(request_id),
+ send_callback_(callback),
zero_click_only_(request_zero_click_only),
origin_(request_origin),
include_passwords_(include_passwords),
@@ -42,7 +42,7 @@ CredentialManagerPendingRequestTask::~CredentialManagerPendingRequestTask() =
void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
ScopedVector<autofill::PasswordForm> results) {
if (delegate_->GetOrigin() != origin_) {
- delegate_->SendCredential(id_, CredentialInfo());
+ delegate_->SendCredential(send_callback_, CredentialInfo());
return;
}
@@ -88,7 +88,7 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
}
if ((local_results.empty() && federated_results.empty())) {
- delegate_->SendCredential(id_, CredentialInfo());
+ delegate_->SendCredential(send_callback_, CredentialInfo());
return;
}
@@ -108,7 +108,7 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
? CredentialType::CREDENTIAL_TYPE_PASSWORD
: CredentialType::CREDENTIAL_TYPE_FEDERATED);
delegate_->client()->NotifyUserAutoSignin(std::move(local_results));
- delegate_->SendCredential(id_, info);
+ delegate_->SendCredential(send_callback_, info);
return;
}
@@ -122,7 +122,7 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
std::move(local_results), std::move(federated_results), origin_,
base::Bind(
&CredentialManagerPendingRequestTaskDelegate::SendCredential,
- base::Unretained(delegate_), id_))) {
+ base::Unretained(delegate_), send_callback_))) {
if (can_use_autosignin) {
// The user had credentials, but either chose not to share them with the
// site, or was prevented from doing so by lack of zero-click (or the
@@ -133,7 +133,7 @@ void CredentialManagerPendingRequestTask::OnGetPasswordStoreResults(
std::move(potential_autosignin_form));
}
- delegate_->SendCredential(id_, CredentialInfo());
+ delegate_->SendCredential(send_callback_, CredentialInfo());
}
}

Powered by Google App Engine
This is Rietveld 408576698