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

Unified Diff: ios/chrome/browser/passwords/credential_manager.mm

Issue 1872133002: Revert of Reland: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/passwords/credential_manager.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/passwords/credential_manager.mm
diff --git a/ios/chrome/browser/passwords/credential_manager.mm b/ios/chrome/browser/passwords/credential_manager.mm
index 1389ebae6a1c031178be02469f5f2de344634be5..b1e86fd1577e59f9cb4411ceb458010cc16f3555 100644
--- a/ios/chrome/browser/passwords/credential_manager.mm
+++ b/ios/chrome/browser/passwords/credential_manager.mm
@@ -117,7 +117,7 @@
// Invoked when the page invokes navigator.credentials.request(), this
// function will attempt to retrieve a Credential from the PasswordStore that
// meets the specified parameters and, if successful, send it back to the page
- // via SendCredentialByID.
+ // via SendCredential.
DCHECK_GE(request_id, 0);
password_manager::PasswordStore* store = GetPasswordStore();
@@ -139,7 +139,7 @@
// available, send back an empty credential.
if (zero_click_only && !IsZeroClickAllowed()) {
base::MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(&CredentialManager::SendCredentialByID,
+ FROM_HERE, base::Bind(&CredentialManager::SendCredential,
weak_factory_.GetWeakPtr(), request_id,
password_manager::CredentialInfo()));
return;
@@ -161,9 +161,8 @@
std::vector<std::string> realms;
pending_request_.reset(
new password_manager::CredentialManagerPendingRequestTask(
- this, base::Bind(&CredentialManager::SendCredentialByID,
- base::Unretained(this), request_id),
- zero_click_only, page_url, true, federation_urls, realms));
+ this, request_id, zero_click_only, page_url, true, federation_urls,
+ realms));
store->GetAutofillableLogins(pending_request_.get());
}
@@ -270,12 +269,6 @@
}
void CredentialManager::SendCredential(
- const password_manager::SendCredentialCallback& send_callback,
- const password_manager::CredentialInfo& credential) {
- send_callback.Run(credential);
-}
-
-void CredentialManager::SendCredentialByID(
int request_id,
const password_manager::CredentialInfo& credential) {
// Invoked when the asynchronous interaction with the PasswordStore completes,
@@ -291,9 +284,8 @@
}];
}
-void CredentialManager::SendPasswordForm(
- const password_manager::SendCredentialCallback& send_callback,
- const autofill::PasswordForm* form) {
+void CredentialManager::SendPasswordForm(int request_id,
+ const autofill::PasswordForm* form) {
password_manager::CredentialInfo info;
if (form) {
password_manager::CredentialType type_to_return =
@@ -303,7 +295,7 @@
info = password_manager::CredentialInfo(*form, type_to_return);
// TODO(vasilii): update |skip_zero_click| in the store (crbug.com/594110).
}
- SendCredential(send_callback, info);
+ SendCredential(request_id, info);
}
password_manager::PasswordManagerClient* CredentialManager::client() const {
« no previous file with comments | « ios/chrome/browser/passwords/credential_manager.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698