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_for_saving_count() const { |
| 134 return called_show_manual_fallback_for_saving_count_; |
| 135 } |
| 136 |
133 bool called_manual_fallback_suggestion() { | 137 bool called_manual_fallback_suggestion() { |
134 return called_manual_fallback_suggestion_; | 138 return called_manual_fallback_suggestion_; |
135 } | 139 } |
136 | 140 |
137 private: | 141 private: |
138 // mojom::PasswordManagerDriver: | 142 // mojom::PasswordManagerDriver: |
139 void PasswordFormsParsed( | 143 void PasswordFormsParsed( |
140 const std::vector<autofill::PasswordForm>& forms) override; | 144 const std::vector<autofill::PasswordForm>& forms) override; |
141 | 145 |
142 void PasswordFormsRendered( | 146 void PasswordFormsRendered( |
(...skipping 27 matching lines...) Expand all Loading... |
170 | 174 |
171 void UserModifiedPasswordField() override; | 175 void UserModifiedPasswordField() override; |
172 | 176 |
173 void SaveGenerationFieldDetectedByClassifier( | 177 void SaveGenerationFieldDetectedByClassifier( |
174 const autofill::PasswordForm& password_form, | 178 const autofill::PasswordForm& password_form, |
175 const base::string16& generation_field) override; | 179 const base::string16& generation_field) override; |
176 | 180 |
177 void CheckSafeBrowsingReputation(const GURL& form_action, | 181 void CheckSafeBrowsingReputation(const GURL& form_action, |
178 const GURL& frame_url) override; | 182 const GURL& frame_url) override; |
179 | 183 |
| 184 void ShowManualFallbackForSaving( |
| 185 const autofill::PasswordForm& password_form) override; |
| 186 void HideManualFallbackForSaving() override; |
| 187 |
180 // Records whether ShowPasswordSuggestions() gets called. | 188 // Records whether ShowPasswordSuggestions() gets called. |
181 bool called_show_pw_suggestions_ = false; | 189 bool called_show_pw_suggestions_ = false; |
182 // Records data received via ShowPasswordSuggestions() call. | 190 // Records data received via ShowPasswordSuggestions() call. |
183 int show_pw_suggestions_key_ = -1; | 191 int show_pw_suggestions_key_ = -1; |
184 base::Optional<base::string16> show_pw_suggestions_username_; | 192 base::Optional<base::string16> show_pw_suggestions_username_; |
185 int show_pw_suggestions_options_ = -1; | 193 int show_pw_suggestions_options_ = -1; |
186 // Records whether ShowNotSecureWarning() gets called. | 194 // Records whether ShowNotSecureWarning() gets called. |
187 bool called_show_not_secure_warning_ = false; | 195 bool called_show_not_secure_warning_ = false; |
188 // Record whenether ShowManualFallbackSuggestion gets called. | 196 // Record whenether ShowManualFallbackSuggestion gets called. |
189 bool called_manual_fallback_suggestion_ = false; | 197 bool called_manual_fallback_suggestion_ = false; |
(...skipping 22 matching lines...) Expand all Loading... |
212 // Records data received via SaveGenerationFieldDetectedByClassifier() call. | 220 // Records data received via SaveGenerationFieldDetectedByClassifier() call. |
213 base::Optional<base::string16> save_generation_field_; | 221 base::Optional<base::string16> save_generation_field_; |
214 // Records whether PasswordNoLongerGenerated() gets called. | 222 // Records whether PasswordNoLongerGenerated() gets called. |
215 bool called_password_no_longer_generated_ = false; | 223 bool called_password_no_longer_generated_ = false; |
216 // Records whether PresaveGeneratedPassword() gets called. | 224 // Records whether PresaveGeneratedPassword() gets called. |
217 bool called_presave_generated_password_ = false; | 225 bool called_presave_generated_password_ = false; |
218 | 226 |
219 // Records number of times CheckSafeBrowsingReputation() gets called. | 227 // Records number of times CheckSafeBrowsingReputation() gets called. |
220 int called_check_safe_browsing_reputation_cnt_ = 0; | 228 int called_check_safe_browsing_reputation_cnt_ = 0; |
221 | 229 |
| 230 // Records the number of request to show manual fallback for password saving. |
| 231 // If it is zero, the fallback is not available. |
| 232 int called_show_manual_fallback_for_saving_count_ = 0; |
| 233 |
222 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; | 234 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; |
223 }; | 235 }; |
224 | 236 |
225 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 237 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
OLD | NEW |