| 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 |
| 46 namespace gfx { | 48 namespace gfx { |
| 47 class RectF; | 49 class RectF; |
| 48 } | 50 } |
| 49 | 51 |
| 50 namespace user_prefs { | 52 namespace user_prefs { |
| 51 class PrefRegistrySyncable; | 53 class PrefRegistrySyncable; |
| 52 } | 54 } |
| 53 | 55 |
| 54 namespace autofill { | 56 namespace autofill { |
| 55 | 57 |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 static void DisambiguateNameUploadTypes( | 470 static void DisambiguateNameUploadTypes( |
| 469 FormStructure* form, | 471 FormStructure* form, |
| 470 size_t current_index, | 472 size_t current_index, |
| 471 const ServerFieldTypeSet& upload_types); | 473 const ServerFieldTypeSet& upload_types); |
| 472 | 474 |
| 473 #ifdef ENABLE_FORM_DEBUG_DUMP | 475 #ifdef ENABLE_FORM_DEBUG_DUMP |
| 474 // Dumps the cached forms to a file on disk. | 476 // Dumps the cached forms to a file on disk. |
| 475 void DumpAutofillData(bool imported_cc) const; | 477 void DumpAutofillData(bool imported_cc) const; |
| 476 #endif | 478 #endif |
| 477 | 479 |
| 480 // Logs the card upload decision UKM. |
| 481 void LogCardUploadDecisionUkm( |
| 482 AutofillMetrics::CardUploadDecisionMetric upload_decision); |
| 483 |
| 478 // Provides driver-level context to the shared code of the component. Must | 484 // Provides driver-level context to the shared code of the component. Must |
| 479 // outlive this object. | 485 // outlive this object. |
| 480 AutofillDriver* driver_; | 486 AutofillDriver* driver_; |
| 481 | 487 |
| 482 AutofillClient* const client_; | 488 AutofillClient* const client_; |
| 483 | 489 |
| 484 // Handles Payments service requests. | 490 // Handles Payments service requests. |
| 485 std::unique_ptr<payments::PaymentsClient> payments_client_; | 491 std::unique_ptr<payments::PaymentsClient> payments_client_; |
| 486 | 492 |
| 487 std::string app_locale_; | 493 std::string app_locale_; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // Collected information about the autofill form where unmasked card will be | 544 // Collected information about the autofill form where unmasked card will be |
| 539 // filled. | 545 // filled. |
| 540 int unmasking_query_id_; | 546 int unmasking_query_id_; |
| 541 FormData unmasking_form_; | 547 FormData unmasking_form_; |
| 542 FormFieldData unmasking_field_; | 548 FormFieldData unmasking_field_; |
| 543 CreditCard masked_card_; | 549 CreditCard masked_card_; |
| 544 | 550 |
| 545 // Collected information about a pending upload request. | 551 // Collected information about a pending upload request. |
| 546 payments::PaymentsClient::UploadRequestDetails upload_request_; | 552 payments::PaymentsClient::UploadRequestDetails upload_request_; |
| 547 bool user_did_accept_upload_prompt_; | 553 bool user_did_accept_upload_prompt_; |
| 554 GURL pending_upload_request_url_; |
| 548 | 555 |
| 549 #ifdef ENABLE_FORM_DEBUG_DUMP | 556 #ifdef ENABLE_FORM_DEBUG_DUMP |
| 550 // The last few autofilled forms (key/value pairs) submitted, for debugging. | 557 // The last few autofilled forms (key/value pairs) submitted, for debugging. |
| 551 // TODO(brettw) this should be removed. See DumpAutofillData. | 558 // TODO(brettw) this should be removed. See DumpAutofillData. |
| 552 std::vector<std::map<std::string, base::string16>> | 559 std::vector<std::map<std::string, base::string16>> |
| 553 recently_autofilled_forms_; | 560 recently_autofilled_forms_; |
| 554 #endif | 561 #endif |
| 555 | 562 |
| 556 // Suggestion backend ID to ID mapping. We keep two maps to convert back and | 563 // Suggestion backend ID to ID mapping. We keep two maps to convert back and |
| 557 // forth. These should be used only by BackendIDToInt and IntToBackendID. | 564 // forth. These should be used only by BackendIDToInt and IntToBackendID. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, | 620 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, |
| 614 OnLoadedServerPredictions_ResetManager); | 621 OnLoadedServerPredictions_ResetManager); |
| 615 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); | 622 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); |
| 616 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); | 623 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); |
| 617 DISALLOW_COPY_AND_ASSIGN(AutofillManager); | 624 DISALLOW_COPY_AND_ASSIGN(AutofillManager); |
| 618 }; | 625 }; |
| 619 | 626 |
| 620 } // namespace autofill | 627 } // namespace autofill |
| 621 | 628 |
| 622 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ | 629 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ |
| OLD | NEW |