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 <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #endif | 36 #endif |
37 | 37 |
38 // This define protects some debugging code (see DumpAutofillData). This | 38 // This define protects some debugging code (see DumpAutofillData). This |
39 // is here to make it easier to delete this code when the test is complete, | 39 // is here to make it easier to delete this code when the test is complete, |
40 // and to prevent adding the code on mobile where there is no desktop (the | 40 // and to prevent adding the code on mobile where there is no desktop (the |
41 // debug dump file is written to the desktop) or command-line flags to enable. | 41 // debug dump file is written to the desktop) or command-line flags to enable. |
42 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) | 42 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) |
43 #define ENABLE_FORM_DEBUG_DUMP | 43 #define ENABLE_FORM_DEBUG_DUMP |
44 #endif | 44 #endif |
45 | 45 |
46 class GURL; | |
47 | |
48 namespace gfx { | 46 namespace gfx { |
49 class RectF; | 47 class RectF; |
50 } | 48 } |
51 | 49 |
52 namespace user_prefs { | 50 namespace user_prefs { |
53 class PrefRegistrySyncable; | 51 class PrefRegistrySyncable; |
54 } | 52 } |
55 | 53 |
56 namespace autofill { | 54 namespace autofill { |
57 | 55 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 int MakeFrontendID(const std::string& cc_backend_id, | 261 int MakeFrontendID(const std::string& cc_backend_id, |
264 const std::string& profile_backend_id) const; | 262 const std::string& profile_backend_id) const; |
265 void SplitFrontendID(int frontend_id, | 263 void SplitFrontendID(int frontend_id, |
266 std::string* cc_backend_id, | 264 std::string* cc_backend_id, |
267 std::string* profile_backend_id) const; | 265 std::string* profile_backend_id) const; |
268 | 266 |
269 std::vector<std::unique_ptr<FormStructure>>* form_structures() { | 267 std::vector<std::unique_ptr<FormStructure>>* form_structures() { |
270 return &form_structures_; | 268 return &form_structures_; |
271 } | 269 } |
272 | 270 |
| 271 AutofillMetrics::FormInteractionsUkmLogger* form_interactions_ukm_logger() { |
| 272 return form_interactions_ukm_logger_.get(); |
| 273 } |
| 274 |
273 // Exposed for testing. | 275 // Exposed for testing. |
274 AutofillExternalDelegate* external_delegate() { | 276 AutofillExternalDelegate* external_delegate() { |
275 return external_delegate_; | 277 return external_delegate_; |
276 } | 278 } |
277 | 279 |
278 // Exposed for testing. | 280 // Exposed for testing. |
279 void set_download_manager(AutofillDownloadManager* manager) { | 281 void set_download_manager(AutofillDownloadManager* manager) { |
280 download_manager_.reset(manager); | 282 download_manager_.reset(manager); |
281 } | 283 } |
282 | 284 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 505 |
504 std::deque<std::string> autofilled_form_signatures_; | 506 std::deque<std::string> autofilled_form_signatures_; |
505 | 507 |
506 // Handles queries and uploads to Autofill servers. Will be NULL if | 508 // Handles queries and uploads to Autofill servers. Will be NULL if |
507 // the download manager functionality is disabled. | 509 // the download manager functionality is disabled. |
508 std::unique_ptr<AutofillDownloadManager> download_manager_; | 510 std::unique_ptr<AutofillDownloadManager> download_manager_; |
509 | 511 |
510 // Handles single-field autocomplete form data. | 512 // Handles single-field autocomplete form data. |
511 std::unique_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; | 513 std::unique_ptr<AutocompleteHistoryManager> autocomplete_history_manager_; |
512 | 514 |
| 515 // Utility for logging URL keyed metrics. |
| 516 std::unique_ptr<AutofillMetrics::FormInteractionsUkmLogger> |
| 517 form_interactions_ukm_logger_; |
| 518 |
513 // Utilities for logging form events. | 519 // Utilities for logging form events. |
514 std::unique_ptr<AutofillMetrics::FormEventLogger> address_form_event_logger_; | 520 std::unique_ptr<AutofillMetrics::FormEventLogger> address_form_event_logger_; |
515 std::unique_ptr<AutofillMetrics::FormEventLogger> | 521 std::unique_ptr<AutofillMetrics::FormEventLogger> |
516 credit_card_form_event_logger_; | 522 credit_card_form_event_logger_; |
517 | 523 |
518 // Have we logged whether Autofill is enabled for this page load? | 524 // Have we logged whether Autofill is enabled for this page load? |
519 bool has_logged_autofill_enabled_; | 525 bool has_logged_autofill_enabled_; |
520 // Have we logged an address suggestions count metric for this page? | 526 // Have we logged an address suggestions count metric for this page? |
521 bool has_logged_address_suggestions_count_; | 527 bool has_logged_address_suggestions_count_; |
522 // Have we shown Autofill suggestions at least once? | 528 // Have we shown Autofill suggestions at least once? |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 DeterminePossibleFieldTypesForUpload); | 594 DeterminePossibleFieldTypesForUpload); |
589 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 595 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
590 DeterminePossibleFieldTypesForUploadStressTest); | 596 DeterminePossibleFieldTypesForUploadStressTest); |
591 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes); | 597 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes); |
592 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 598 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
593 DisabledAutofillDispatchesError); | 599 DisabledAutofillDispatchesError); |
594 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressFilledFormEvents); | 600 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressFilledFormEvents); |
595 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSubmittedFormEvents); | 601 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSubmittedFormEvents); |
596 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressWillSubmitFormEvents); | 602 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressWillSubmitFormEvents); |
597 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSuggestionsCount); | 603 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressSuggestionsCount); |
| 604 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillFormSubmittedState); |
598 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtPageLoad); | 605 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AutofillIsEnabledAtPageLoad); |
599 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardSelectedFormEvents); | 606 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardSelectedFormEvents); |
600 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardFilledFormEvents); | 607 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardFilledFormEvents); |
601 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardGetRealPanDuration); | 608 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardGetRealPanDuration); |
602 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardWillSubmitFormEvents); | 609 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardWillSubmitFormEvents); |
603 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardSubmittedFormEvents); | 610 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, CreditCardSubmittedFormEvents); |
604 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, | 611 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, |
605 CreditCardCheckoutFlowUserActions); | 612 CreditCardCheckoutFlowUserActions); |
606 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, ProfileCheckoutFlowUserActions); | 613 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, ProfileCheckoutFlowUserActions); |
607 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, DeveloperEngagement); | 614 FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, DeveloperEngagement); |
(...skipping 15 matching lines...) Expand all Loading... |
623 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 630 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
624 OnLoadedServerPredictions_ResetManager); | 631 OnLoadedServerPredictions_ResetManager); |
625 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 632 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
626 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 633 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
627 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 634 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
628 }; | 635 }; |
629 | 636 |
630 } // namespace autofill | 637 } // namespace autofill |
631 | 638 |
632 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 639 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
OLD | NEW |