| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool called_presave_generated_password() const { | 117 bool called_presave_generated_password() const { |
| 118 return called_presave_generated_password_; | 118 return called_presave_generated_password_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 void reset_called_presave_generated_password() { | 121 void reset_called_presave_generated_password() { |
| 122 called_presave_generated_password_ = false; | 122 called_presave_generated_password_ = false; |
| 123 } | 123 } |
| 124 | 124 |
| 125 int called_check_safe_browsing_reputation_cnt() { |
| 126 return called_check_safe_browsing_reputation_cnt_; |
| 127 } |
| 128 |
| 125 private: | 129 private: |
| 126 // mojom::PasswordManagerDriver: | 130 // mojom::PasswordManagerDriver: |
| 127 void PasswordFormsParsed( | 131 void PasswordFormsParsed( |
| 128 const std::vector<autofill::PasswordForm>& forms) override; | 132 const std::vector<autofill::PasswordForm>& forms) override; |
| 129 | 133 |
| 130 void PasswordFormsRendered( | 134 void PasswordFormsRendered( |
| 131 const std::vector<autofill::PasswordForm>& visible_forms, | 135 const std::vector<autofill::PasswordForm>& visible_forms, |
| 132 bool did_stop_loading) override; | 136 bool did_stop_loading) override; |
| 133 | 137 |
| 134 void PasswordFormSubmitted( | 138 void PasswordFormSubmitted( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 150 | 154 |
| 151 void ShowNotSecureWarning(base::i18n::TextDirection text_direction, | 155 void ShowNotSecureWarning(base::i18n::TextDirection text_direction, |
| 152 const gfx::RectF& bounds) override; | 156 const gfx::RectF& bounds) override; |
| 153 | 157 |
| 154 void RecordSavePasswordProgress(const std::string& log) override; | 158 void RecordSavePasswordProgress(const std::string& log) override; |
| 155 | 159 |
| 156 void SaveGenerationFieldDetectedByClassifier( | 160 void SaveGenerationFieldDetectedByClassifier( |
| 157 const autofill::PasswordForm& password_form, | 161 const autofill::PasswordForm& password_form, |
| 158 const base::string16& generation_field) override; | 162 const base::string16& generation_field) override; |
| 159 | 163 |
| 164 void CheckSafeBrowsingReputation(const GURL& form_action, |
| 165 const GURL& frame_url) override; |
| 166 |
| 160 // Records whether ShowPasswordSuggestions() gets called. | 167 // Records whether ShowPasswordSuggestions() gets called. |
| 161 bool called_show_pw_suggestions_ = false; | 168 bool called_show_pw_suggestions_ = false; |
| 162 // Records data received via ShowPasswordSuggestions() call. | 169 // Records data received via ShowPasswordSuggestions() call. |
| 163 int show_pw_suggestions_key_ = -1; | 170 int show_pw_suggestions_key_ = -1; |
| 164 base::Optional<base::string16> show_pw_suggestions_username_; | 171 base::Optional<base::string16> show_pw_suggestions_username_; |
| 165 int show_pw_suggestions_options_ = -1; | 172 int show_pw_suggestions_options_ = -1; |
| 166 // Records whether ShowNotSecureWarning() gets called. | 173 // Records whether ShowNotSecureWarning() gets called. |
| 167 bool called_show_not_secure_warning_ = false; | 174 bool called_show_not_secure_warning_ = false; |
| 168 // Records whether PasswordFormSubmitted() gets called. | 175 // Records whether PasswordFormSubmitted() gets called. |
| 169 bool called_password_form_submitted_ = false; | 176 bool called_password_form_submitted_ = false; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 185 bool called_record_save_progress_ = false; | 192 bool called_record_save_progress_ = false; |
| 186 // Records whether SaveGenerationFieldDetectedByClassifier() gets called. | 193 // Records whether SaveGenerationFieldDetectedByClassifier() gets called. |
| 187 bool called_save_generation_field_ = false; | 194 bool called_save_generation_field_ = false; |
| 188 // Records data received via SaveGenerationFieldDetectedByClassifier() call. | 195 // Records data received via SaveGenerationFieldDetectedByClassifier() call. |
| 189 base::Optional<base::string16> save_generation_field_; | 196 base::Optional<base::string16> save_generation_field_; |
| 190 // Records whether PasswordNoLongerGenerated() gets called. | 197 // Records whether PasswordNoLongerGenerated() gets called. |
| 191 bool called_password_no_longer_generated_ = false; | 198 bool called_password_no_longer_generated_ = false; |
| 192 // Records whether PresaveGeneratedPassword() gets called. | 199 // Records whether PresaveGeneratedPassword() gets called. |
| 193 bool called_presave_generated_password_ = false; | 200 bool called_presave_generated_password_ = false; |
| 194 | 201 |
| 202 // Records number of times CheckSafeBrowsingReputation() gets called. |
| 203 int called_check_safe_browsing_reputation_cnt_ = 0; |
| 204 |
| 195 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; | 205 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; |
| 196 }; | 206 }; |
| 197 | 207 |
| 198 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 208 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| OLD | NEW |