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

Side by Side Diff: components/password_manager/core/browser/credential_manager_pending_prevent_silent_access_task.h

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: merge Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU IRE_USER_MEDIATION_TASK_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_PREV ENT_SILENT_ACCESS_TASK_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_REQU IRE_USER_MEDIATION_TASK_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_PREV ENT_SILENT_ACCESS_TASK_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/password_manager/core/browser/password_store.h" 9 #include "components/password_manager/core/browser/password_store.h"
10 #include "components/password_manager/core/browser/password_store_consumer.h" 10 #include "components/password_manager/core/browser/password_store_consumer.h"
11 11
12 namespace password_manager { 12 namespace password_manager {
13 13
14 // Handles mediation completion and retrieves embedder-dependent services. 14 // Handles mediation completion and retrieves embedder-dependent services.
15 class CredentialManagerPendingRequireUserMediationTaskDelegate { 15 class CredentialManagerPendingPreventSilentAccessTaskDelegate {
16 public: 16 public:
17 virtual ~CredentialManagerPendingRequireUserMediationTaskDelegate() {} 17 virtual ~CredentialManagerPendingPreventSilentAccessTaskDelegate() {}
18 18
19 // Retrieves the PasswordStore. 19 // Retrieves the PasswordStore.
20 virtual PasswordStore* GetPasswordStore() = 0; 20 virtual PasswordStore* GetPasswordStore() = 0;
21 21
22 // Finishes mediation tasks. 22 // Finishes mediation tasks.
23 virtual void DoneRequiringUserMediation() = 0; 23 virtual void DoneRequiringUserMediation() = 0;
24 }; 24 };
25 25
26 // Notifies the password store that a list of origins require user mediation. 26 // Notifies the password store that a list of origins require user mediation.
27 class CredentialManagerPendingRequireUserMediationTask 27 class CredentialManagerPendingPreventSilentAccessTask
28 : public PasswordStoreConsumer { 28 : public PasswordStoreConsumer {
29 public: 29 public:
30 explicit CredentialManagerPendingRequireUserMediationTask( 30 explicit CredentialManagerPendingPreventSilentAccessTask(
31 CredentialManagerPendingRequireUserMediationTaskDelegate* delegate); 31 CredentialManagerPendingPreventSilentAccessTaskDelegate* delegate);
32 ~CredentialManagerPendingRequireUserMediationTask() override; 32 ~CredentialManagerPendingPreventSilentAccessTask() override;
33 33
34 // Adds an origin to require user mediation. 34 // Adds an origin to require user mediation.
35 void AddOrigin(const PasswordStore::FormDigest& form_digest); 35 void AddOrigin(const PasswordStore::FormDigest& form_digest);
36 36
37 private: 37 private:
38 // PasswordStoreConsumer implementation. 38 // PasswordStoreConsumer implementation.
39 void OnGetPasswordStoreResults( 39 void OnGetPasswordStoreResults(
40 std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; 40 std::vector<std::unique_ptr<autofill::PasswordForm>> results) override;
41 41
42 CredentialManagerPendingRequireUserMediationTaskDelegate* const 42 CredentialManagerPendingPreventSilentAccessTaskDelegate* const
43 delegate_; // Weak. 43 delegate_; // Weak.
44 44
45 // Number of password store requests to be resolved. 45 // Number of password store requests to be resolved.
46 int pending_requests_; 46 int pending_requests_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPendingRequireUserMediationTask); 48 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPendingPreventSilentAccessTask);
49 }; 49 };
50 50
51 } // namespace password_manager 51 } // namespace password_manager
52 52
53 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_R EQUIRE_USER_MEDIATION_TASK_H_ 53 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PENDING_P REVENT_SILENT_ACCESS_TASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698