| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/callback.h" | 10 #include "base/callback.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 12 #include "components/password_manager/core/browser/credential_manager_password_f
orm_manager.h" | 13 #include "components/password_manager/core/browser/credential_manager_password_f
orm_manager.h" |
| 13 #include "components/password_manager/core/browser/credential_manager_pending_re
quest_task.h" | 14 #include "components/password_manager/core/browser/credential_manager_pending_re
quest_task.h" |
| 14 #include "components/password_manager/core/browser/credential_manager_pending_re
quire_user_mediation_task.h" | 15 #include "components/password_manager/core/browser/credential_manager_pending_re
quire_user_mediation_task.h" |
| 15 #include "components/password_manager/core/browser/password_store_consumer.h" | 16 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 16 #include "components/prefs/pref_member.h" | 17 #include "components/prefs/pref_member.h" |
| 17 #include "content/public/browser/web_contents_observer.h" | 18 #include "content/public/browser/web_contents_observer.h" |
| 18 | 19 |
| 19 class GURL; | 20 class GURL; |
| 20 | 21 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // AffiliationMatchHelper grabs a list of realms related to the current | 99 // AffiliationMatchHelper grabs a list of realms related to the current |
| 99 // web origin. | 100 // web origin. |
| 100 void ScheduleRequireMediationTask( | 101 void ScheduleRequireMediationTask( |
| 101 int request_id, | 102 int request_id, |
| 102 const std::vector<std::string>& android_realms); | 103 const std::vector<std::string>& android_realms); |
| 103 | 104 |
| 104 // Returns true iff it's OK to update credentials in the password store. | 105 // Returns true iff it's OK to update credentials in the password store. |
| 105 bool IsUpdatingCredentialAllowed() const; | 106 bool IsUpdatingCredentialAllowed() const; |
| 106 | 107 |
| 107 PasswordManagerClient* client_; | 108 PasswordManagerClient* client_; |
| 108 scoped_ptr<CredentialManagerPasswordFormManager> form_manager_; | 109 std::unique_ptr<CredentialManagerPasswordFormManager> form_manager_; |
| 109 | 110 |
| 110 // Set to false to disable automatic signing in. | 111 // Set to false to disable automatic signing in. |
| 111 BooleanPrefMember auto_signin_enabled_; | 112 BooleanPrefMember auto_signin_enabled_; |
| 112 | 113 |
| 113 // When 'OnRequestCredential' is called, it in turn calls out to the | 114 // When 'OnRequestCredential' is called, it in turn calls out to the |
| 114 // PasswordStore; we push enough data into Pending*Task objects so that | 115 // PasswordStore; we push enough data into Pending*Task objects so that |
| 115 // they can properly respond to the request once the PasswordStore gives | 116 // they can properly respond to the request once the PasswordStore gives |
| 116 // us data. | 117 // us data. |
| 117 scoped_ptr<CredentialManagerPendingRequestTask> pending_request_; | 118 std::unique_ptr<CredentialManagerPendingRequestTask> pending_request_; |
| 118 scoped_ptr<CredentialManagerPendingRequireUserMediationTask> | 119 std::unique_ptr<CredentialManagerPendingRequireUserMediationTask> |
| 119 pending_require_user_mediation_; | 120 pending_require_user_mediation_; |
| 120 | 121 |
| 121 base::WeakPtrFactory<CredentialManagerDispatcher> weak_factory_; | 122 base::WeakPtrFactory<CredentialManagerDispatcher> weak_factory_; |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher); | 124 DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace password_manager | 127 } // namespace password_manager |
| 127 | 128 |
| 128 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_DISPATCHER_H_ | 129 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_DISPATCHER_H_ |
| OLD | NEW |