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

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

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: components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h
diff --git a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h b/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h
index 300160cdabc889c4b475281381424ded654a3cf2..a703bc5c0a7592e5122c7b49e73a4df6c0ee2eda 100644
--- a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h
+++ b/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h
@@ -5,26 +5,17 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQUIRE_USER_MEDIATION_TASK_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQUIRE_USER_MEDIATION_TASK_H_
-#include <set>
-#include <string>
-
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
+#include "components/password_manager/core/browser/password_store.h"
#include "components/password_manager/core/browser/password_store_consumer.h"
-class GURL;
-
-namespace autofill {
-struct PasswordForm;
-} // namespace autofill
-
namespace password_manager {
-class PasswordStore;
-
// Handles mediation completion and retrieves embedder-dependent services.
class CredentialManagerPendingRequireUserMediationTaskDelegate {
public:
+ virtual ~CredentialManagerPendingRequireUserMediationTaskDelegate() {}
+
// Retrieves the PasswordStore.
virtual PasswordStore* GetPasswordStore() = 0;
@@ -36,24 +27,23 @@ class CredentialManagerPendingRequireUserMediationTaskDelegate {
class CredentialManagerPendingRequireUserMediationTask
: public PasswordStoreConsumer {
public:
- CredentialManagerPendingRequireUserMediationTask(
- CredentialManagerPendingRequireUserMediationTaskDelegate* delegate,
- const GURL& origin,
- const std::vector<std::string>& affiliated_realms);
+ explicit CredentialManagerPendingRequireUserMediationTask(
+ CredentialManagerPendingRequireUserMediationTaskDelegate* delegate);
~CredentialManagerPendingRequireUserMediationTask() override;
// Adds an origin to require user mediation.
- void AddOrigin(const GURL& origin);
+ void AddOrigin(const PasswordStore::FormDigest& form_digest);
+ private:
// PasswordStoreConsumer implementation.
void OnGetPasswordStoreResults(
jdoerrie 2016/11/21 22:45:35 Could you explain why this is private now?
vasilii 2016/11/22 09:39:22 It's only called via PasswordStoreConsumer interfa
std::vector<std::unique_ptr<autofill::PasswordForm>> results) override;
- private:
CredentialManagerPendingRequireUserMediationTaskDelegate* const
delegate_; // Weak.
- std::set<std::string> registrable_domains_;
- std::set<std::string> affiliated_realms_;
+
+ // Number of password store requests to be resolved.
+ int pending_requests_;
DISALLOW_COPY_AND_ASSIGN(CredentialManagerPendingRequireUserMediationTask);
};

Powered by Google App Engine
This is Rietveld 408576698