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

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

Issue 2513033002: Refactor CredentialManagerImpl::RequireUserMediation method. (Closed)
Patch Set: ios Created 4 years, 1 month 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: 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 2a3b0816c918cf518dd6aa2e5a30c3e237cfc3ed..74cbc681f9cebe3dc2c034a64a78c4c4cfda688e 100644
--- a/ios/chrome/browser/passwords/credential_manager.mm
+++ b/ios/chrome/browser/passwords/credential_manager.mm
@@ -228,20 +228,14 @@ void CredentialManager::SignedOut(int request_id, const GURL& source_url) {
// information to the PasswordStore via an asynchronous task.
password_manager::PasswordStore* store = GetPasswordStore();
if (store) {
- // Bundle the origins that are sent to the PasswordStore if the task hasn't
- // yet resolved. This task lives across page-loads to enable this bundling.
- if (pending_require_user_mediation_) {
- pending_require_user_mediation_->AddOrigin(page_url);
- } else {
+ if (!pending_require_user_mediation_) {
pending_require_user_mediation_.reset(
new password_manager::
- CredentialManagerPendingRequireUserMediationTask(
- this, page_url, std::vector<std::string>()));
-
- // This will result in a callback to
- // CredentialManagerPendingSignedOutTask::OnGetPasswordStoreResults().
- store->GetAutofillableLogins(pending_require_user_mediation_.get());
+ CredentialManagerPendingRequireUserMediationTask(this));
}
+ password_manager::PasswordStore::FormDigest form = {
+ autofill::PasswordForm::SCHEME_HTML, source_url.spec(), source_url};
+ pending_require_user_mediation_->AddOrigin(form);
}
// Acknowledge the page's signOut notification without waiting for the

Powered by Google App Engine
This is Rietveld 408576698