OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 // not have the necessary information to classify the form at that time) | 160 // not have the necessary information to classify the form at that time) |
161 // so it bypasses the cache and doesn't log the same quality UMA metrics. | 161 // so it bypasses the cache and doesn't log the same quality UMA metrics. |
162 bool UploadPasswordGenerationForm(const FormData& form); | 162 bool UploadPasswordGenerationForm(const FormData& form); |
163 | 163 |
164 // Resets cache. | 164 // Resets cache. |
165 virtual void Reset(); | 165 virtual void Reset(); |
166 | 166 |
167 // Returns the value of the AutofillEnabled pref. | 167 // Returns the value of the AutofillEnabled pref. |
168 virtual bool IsAutofillEnabled() const; | 168 virtual bool IsAutofillEnabled() const; |
169 | 169 |
170 base::string16 GetUserNameToRemove(); | |
171 | |
172 void SetUserNameToRemove(const base::string16& username_to_remove); | |
173 | |
170 protected: | 174 protected: |
171 // Test code should prefer to use this constructor. | 175 // Test code should prefer to use this constructor. |
172 AutofillManager(AutofillDriver* driver, | 176 AutofillManager(AutofillDriver* driver, |
173 autofill::AutofillManagerDelegate* delegate, | 177 autofill::AutofillManagerDelegate* delegate, |
174 PersonalDataManager* personal_data); | 178 PersonalDataManager* personal_data); |
175 | 179 |
176 // Uploads the form data to the Autofill server. | 180 // Uploads the form data to the Autofill server. |
177 virtual void UploadFormData(const FormStructure& submitted_form); | 181 virtual void UploadFormData(const FormStructure& submitted_form); |
178 | 182 |
179 // Logs quality metrics for the |submitted_form| and uploads the form data | 183 // Logs quality metrics for the |submitted_form| and uploads the form data |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 | 339 |
336 // Delegate to perform external processing (display, selection) on | 340 // Delegate to perform external processing (display, selection) on |
337 // our behalf. Weak. | 341 // our behalf. Weak. |
338 AutofillExternalDelegate* external_delegate_; | 342 AutofillExternalDelegate* external_delegate_; |
339 | 343 |
340 // Delegate used in test to get notifications on certain events. | 344 // Delegate used in test to get notifications on certain events. |
341 autofill::AutofillManagerTestDelegate* test_delegate_; | 345 autofill::AutofillManagerTestDelegate* test_delegate_; |
342 | 346 |
343 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_; | 347 base::WeakPtrFactory<AutofillManager> weak_ptr_factory_; |
344 | 348 |
349 base::string16 username_to_remove_; | |
vabr (Chromium)
2014/04/09 14:06:30
Please comment, e.g.:
"When the user deletes a pas
| |
350 | |
345 friend class AutofillManagerTest; | 351 friend class AutofillManagerTest; |
346 friend class autofill::FormStructureBrowserTest; | 352 friend class autofill::FormStructureBrowserTest; |
347 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 353 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
348 DeterminePossibleFieldTypesForUpload); | 354 DeterminePossibleFieldTypesForUpload); |
349 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 355 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
350 DeterminePossibleFieldTypesForUploadStressTest); | 356 DeterminePossibleFieldTypesForUploadStressTest); |
351 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 357 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
352 DisabledAutofillDispatchesError); | 358 DisabledAutofillDispatchesError); |
353 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSuggestionsCount); | 359 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSuggestionsCount); |
354 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtPageLoad); | 360 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtPageLoad); |
(...skipping 12 matching lines...) Expand all Loading... | |
367 UserHappinessFormLoadAndSubmission); | 373 UserHappinessFormLoadAndSubmission); |
368 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); | 374 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, UserHappinessFormInteraction); |
369 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 375 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
370 FormSubmittedAutocompleteEnabled); | 376 FormSubmittedAutocompleteEnabled); |
371 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 377 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
372 }; | 378 }; |
373 | 379 |
374 } // namespace autofill | 380 } // namespace autofill |
375 | 381 |
376 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 382 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |