| 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 CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void ShowPasswordGenerationPopup(const gfx::RectF& bounds, | 97 void ShowPasswordGenerationPopup(const gfx::RectF& bounds, |
| 98 int max_length, | 98 int max_length, |
| 99 const base::string16& generation_element, | 99 const base::string16& generation_element, |
| 100 bool is_manually_triggered, | 100 bool is_manually_triggered, |
| 101 const autofill::PasswordForm& form) override; | 101 const autofill::PasswordForm& form) override; |
| 102 void ShowPasswordEditingPopup(const gfx::RectF& bounds, | 102 void ShowPasswordEditingPopup(const gfx::RectF& bounds, |
| 103 const autofill::PasswordForm& form) override; | 103 const autofill::PasswordForm& form) override; |
| 104 void GenerationAvailableForForm(const autofill::PasswordForm& form) override; | 104 void GenerationAvailableForForm(const autofill::PasswordForm& form) override; |
| 105 void HidePasswordGenerationPopup() override; | 105 void HidePasswordGenerationPopup() override; |
| 106 | 106 |
| 107 #if defined(SAFE_BROWSING_DB_LOCAL) |
| 108 safe_browsing::PasswordProtectionService* GetPasswordProtectionService() |
| 109 const override; |
| 110 #endif |
| 111 |
| 107 static void CreateForWebContentsWithAutofillClient( | 112 static void CreateForWebContentsWithAutofillClient( |
| 108 content::WebContents* contents, | 113 content::WebContents* contents, |
| 109 autofill::AutofillClient* autofill_client); | 114 autofill::AutofillClient* autofill_client); |
| 110 | 115 |
| 111 // Observer for PasswordGenerationPopup events. Used for testing. | 116 // Observer for PasswordGenerationPopup events. Used for testing. |
| 112 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); | 117 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); |
| 113 | 118 |
| 114 static void BindCredentialManager( | 119 static void BindCredentialManager( |
| 115 content::RenderFrameHost* render_frame_host, | 120 content::RenderFrameHost* render_frame_host, |
| 116 password_manager::mojom::CredentialManagerRequest request); | 121 password_manager::mojom::CredentialManagerRequest request); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // means that nothing was chosen. |one_local_credential| is true if there was | 162 // means that nothing was chosen. |one_local_credential| is true if there was |
| 158 // just one local credential to be chosen from. | 163 // just one local credential to be chosen from. |
| 159 void OnCredentialsChosen(const CredentialsCallback& callback, | 164 void OnCredentialsChosen(const CredentialsCallback& callback, |
| 160 bool one_local_credential, | 165 bool one_local_credential, |
| 161 const autofill::PasswordForm* form); | 166 const autofill::PasswordForm* form); |
| 162 | 167 |
| 163 // Returns true if this profile has metrics reporting and active sync | 168 // Returns true if this profile has metrics reporting and active sync |
| 164 // without custom sync passphrase. | 169 // without custom sync passphrase. |
| 165 static bool ShouldAnnotateNavigationEntries(Profile* profile); | 170 static bool ShouldAnnotateNavigationEntries(Profile* profile); |
| 166 | 171 |
| 167 #if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE) | |
| 168 // Return true if we can set PasswordProtectionService in | |
| 169 // |password_reuse_detection_manager_|. | |
| 170 static bool CanSetPasswordProtectionService(); | |
| 171 #endif | |
| 172 | |
| 173 Profile* const profile_; | 172 Profile* const profile_; |
| 174 | 173 |
| 175 password_manager::PasswordManager password_manager_; | 174 password_manager::PasswordManager password_manager_; |
| 176 | 175 |
| 177 // TODO(crbug.com/706392): Fix password reuse detection for Android. | 176 // TODO(crbug.com/706392): Fix password reuse detection for Android. |
| 178 #if !defined(OS_ANDROID) | 177 #if !defined(OS_ANDROID) |
| 179 password_manager::PasswordReuseDetectionManager | 178 password_manager::PasswordReuseDetectionManager |
| 180 password_reuse_detection_manager_; | 179 password_reuse_detection_manager_; |
| 181 #endif | 180 #endif |
| 182 | 181 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 206 std::unique_ptr<password_manager::LogManager> log_manager_; | 205 std::unique_ptr<password_manager::LogManager> log_manager_; |
| 207 | 206 |
| 208 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the | 207 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the |
| 209 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. | 208 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. |
| 210 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_; | 209 std::unique_ptr<autofill::PasswordForm> possible_auto_sign_in_; |
| 211 | 210 |
| 212 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 211 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
| 213 }; | 212 }; |
| 214 | 213 |
| 215 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 214 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
| OLD | NEW |