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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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() { |
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_cnt() { | |
vasilii
2017/07/21 12:48:20
const
kolos1
2017/07/24 15:33:30
Done.
| |
134 return called_show_manual_fallback_cnt_; | |
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 ShowManualFallback(const autofill::PasswordForm& password_form) override; | |
178 void HideManualFallback() override; | |
179 | |
173 // Records whether ShowPasswordSuggestions() gets called. | 180 // Records whether ShowPasswordSuggestions() gets called. |
174 bool called_show_pw_suggestions_ = false; | 181 bool called_show_pw_suggestions_ = false; |
175 // Records data received via ShowPasswordSuggestions() call. | 182 // Records data received via ShowPasswordSuggestions() call. |
176 int show_pw_suggestions_key_ = -1; | 183 int show_pw_suggestions_key_ = -1; |
177 base::Optional<base::string16> show_pw_suggestions_username_; | 184 base::Optional<base::string16> show_pw_suggestions_username_; |
178 int show_pw_suggestions_options_ = -1; | 185 int show_pw_suggestions_options_ = -1; |
179 // Records whether ShowNotSecureWarning() gets called. | 186 // Records whether ShowNotSecureWarning() gets called. |
180 bool called_show_not_secure_warning_ = false; | 187 bool called_show_not_secure_warning_ = false; |
181 // Records whether PasswordFormSubmitted() gets called. | 188 // Records whether PasswordFormSubmitted() gets called. |
182 bool called_password_form_submitted_ = false; | 189 bool called_password_form_submitted_ = false; |
(...skipping 20 matching lines...) Expand all Loading... | |
203 // Records data received via SaveGenerationFieldDetectedByClassifier() call. | 210 // Records data received via SaveGenerationFieldDetectedByClassifier() call. |
204 base::Optional<base::string16> save_generation_field_; | 211 base::Optional<base::string16> save_generation_field_; |
205 // Records whether PasswordNoLongerGenerated() gets called. | 212 // Records whether PasswordNoLongerGenerated() gets called. |
206 bool called_password_no_longer_generated_ = false; | 213 bool called_password_no_longer_generated_ = false; |
207 // Records whether PresaveGeneratedPassword() gets called. | 214 // Records whether PresaveGeneratedPassword() gets called. |
208 bool called_presave_generated_password_ = false; | 215 bool called_presave_generated_password_ = false; |
209 | 216 |
210 // Records number of times CheckSafeBrowsingReputation() gets called. | 217 // Records number of times CheckSafeBrowsingReputation() gets called. |
211 int called_check_safe_browsing_reputation_cnt_ = 0; | 218 int called_check_safe_browsing_reputation_cnt_ = 0; |
212 | 219 |
220 // Records the number of request to show manual fallback for password saving. | |
221 // If it is zero, the fallback is not available. | |
222 int called_show_manual_fallback_cnt_ = 0; | |
vasilii
2017/07/21 12:48:20
What is "cnt"? Probably should be renamed to "coun
kolos1
2017/07/24 15:33:30
Done.
| |
223 | |
213 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; | 224 mojo::BindingSet<autofill::mojom::PasswordManagerDriver> bindings_; |
214 }; | 225 }; |
215 | 226 |
216 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 227 #endif // CHROME_RENDERER_AUTOFILL_FAKE_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
OLD | NEW |