| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 5 #ifndef CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| 6 #define CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 6 #define CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool called_presave_generated_password() const { | 121 bool called_presave_generated_password() const { |
| 122 return called_presave_generated_password_; | 122 return called_presave_generated_password_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 void reset_called_presave_generated_password() { | 125 void reset_called_presave_generated_password() { |
| 126 called_presave_generated_password_ = false; | 126 called_presave_generated_password_ = false; |
| 127 } | 127 } |
| 128 | 128 |
| 129 int called_check_safe_browsing_reputation_cnt() { | 129 int called_check_safe_browsing_reputation_cnt() const { |
| 130 return called_check_safe_browsing_reputation_cnt_; | 130 return called_check_safe_browsing_reputation_cnt_; |
| 131 } | 131 } |
| 132 | 132 |
| 133 int called_show_manual_fallback_count() const { |
| 134 return called_show_manual_fallback_count_; |
| 135 } |
| 136 |
| 133 private: | 137 private: |
| 134 // mojom::PasswordManagerDriver: | 138 // mojom::PasswordManagerDriver: |
| 135 void PasswordFormsParsed( | 139 void PasswordFormsParsed( |
| 136 const std::vector<autofill::PasswordForm>& forms) override; | 140 const std::vector<autofill::PasswordForm>& forms) override; |
| 137 | 141 |
| 138 void PasswordFormsRendered( | 142 void PasswordFormsRendered( |
| 139 const std::vector<autofill::PasswordForm>& visible_forms, | 143 const std::vector<autofill::PasswordForm>& visible_forms, |
| 140 bool did_stop_loading) override; | 144 bool did_stop_loading) override; |
| 141 | 145 |
| 142 void PasswordFormSubmitted( | 146 void PasswordFormSubmitted( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 163 | 167 |
| 164 void UserModifiedPasswordField() override; | 168 void UserModifiedPasswordField() override; |
| 165 | 169 |
| 166 void SaveGenerationFieldDetectedByClassifier( | 170 void SaveGenerationFieldDetectedByClassifier( |
| 167 const autofill::PasswordForm& password_form, | 171 const autofill::PasswordForm& password_form, |
| 168 const base::string16& generation_field) override; | 172 const base::string16& generation_field) override; |
| 169 | 173 |
| 170 void CheckSafeBrowsingReputation(const GURL& form_action, | 174 void CheckSafeBrowsingReputation(const GURL& form_action, |
| 171 const GURL& frame_url) override; | 175 const GURL& frame_url) override; |
| 172 | 176 |
| 177 void ShowManualFallbackForSaving( |
| 178 const autofill::PasswordForm& password_form) override; |
| 179 void HideManualFallbackForSaving() override; |
| 180 |
| 173 // Records whether ShowPasswordSuggestions() gets called. | 181 // Records whether ShowPasswordSuggestions() gets called. |
| 174 bool called_show_pw_suggestions_ = false; | 182 bool called_show_pw_suggestions_ = false; |
| 175 // Records data received via ShowPasswordSuggestions() call. | 183 // Records data received via ShowPasswordSuggestions() call. |
| 176 int show_pw_suggestions_key_ = -1; | 184 int show_pw_suggestions_key_ = -1; |
| 177 base::Optional<base::string16> show_pw_suggestions_username_; | 185 base::Optional<base::string16> show_pw_suggestions_username_; |
| 178 int show_pw_suggestions_options_ = -1; | 186 int show_pw_suggestions_options_ = -1; |
| 179 // Records whether ShowNotSecureWarning() gets called. | 187 // Records whether ShowNotSecureWarning() gets called. |
| 180 bool called_show_not_secure_warning_ = false; | 188 bool called_show_not_secure_warning_ = false; |
| 181 // Records whether PasswordFormSubmitted() gets called. | 189 // Records whether PasswordFormSubmitted() gets called. |
| 182 bool called_password_form_submitted_ = false; | 190 bool called_password_form_submitted_ = false; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 203 // Records data received via SaveGenerationFieldDetectedByClassifier() call. | 211 // Records data received via SaveGenerationFieldDetectedByClassifier() call. |
| 204 base::Optional<base::string16> save_generation_field_; | 212 base::Optional<base::string16> save_generation_field_; |
| 205 // Records whether PasswordNoLongerGenerated() gets called. | 213 // Records whether PasswordNoLongerGenerated() gets called. |
| 206 bool called_password_no_longer_generated_ = false; | 214 bool called_password_no_longer_generated_ = false; |
| 207 // Records whether PresaveGeneratedPassword() gets called. | 215 // Records whether PresaveGeneratedPassword() gets called. |
| 208 bool called_presave_generated_password_ = false; | 216 bool called_presave_generated_password_ = false; |
| 209 | 217 |
| 210 // Records number of times CheckSafeBrowsingReputation() gets called. | 218 // Records number of times CheckSafeBrowsingReputation() gets called. |
| 211 int called_check_safe_browsing_reputation_cnt_ = 0; | 219 int called_check_safe_browsing_reputation_cnt_ = 0; |
| 212 | 220 |
| 221 // Records the number of request to show manual fallback for password saving. |
| 222 // If it is zero, the fallback is not available. |
| 223 int called_show_manual_fallback_count_ = 0; |
| 224 |
| 213 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; | 225 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; |
| 214 }; | 226 }; |
| 215 | 227 |
| 216 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 228 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| OLD | NEW |