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

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

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: merge Created 3 years, 7 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_require_user_mediation_task.cc
diff --git a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.cc b/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.cc
deleted file mode 100644
index 79cfe6b1816edd8136ebc3ebaed0a7eddc0d24d2..0000000000000000000000000000000000000000
--- a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h"
-
-#include "components/autofill/core/common/password_form.h"
-
-namespace password_manager {
-
-CredentialManagerPendingRequireUserMediationTask::
- CredentialManagerPendingRequireUserMediationTask(
- CredentialManagerPendingRequireUserMediationTaskDelegate* delegate)
- : delegate_(delegate), pending_requests_(0) {}
-
-CredentialManagerPendingRequireUserMediationTask::
- ~CredentialManagerPendingRequireUserMediationTask() = default;
-
-void CredentialManagerPendingRequireUserMediationTask::AddOrigin(
- const PasswordStore::FormDigest& form_digest) {
- delegate_->GetPasswordStore()->GetLogins(form_digest, this);
- pending_requests_++;
-}
-
-void CredentialManagerPendingRequireUserMediationTask::
- OnGetPasswordStoreResults(
- std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
- PasswordStore* store = delegate_->GetPasswordStore();
- for (const auto& form : results) {
- if (!form->skip_zero_click) {
- form->skip_zero_click = true;
- store->UpdateLogin(*form);
- }
- }
- pending_requests_--;
- if (!pending_requests_)
- delegate_->DoneRequiringUserMediation();
-}
-
-} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698