commit | 2cf0e5c45114b715524089eb71fc2d2f3b2f2373 | [log] [tgz] |
---|---|---|
author | Sujie Zhu <sujiezhu@google.com> | Tue Jul 17 18:00:27 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 17 18:00:27 2018 |
tree | d5d7ddd475dcd535b214c0aff04fa51edb8d2354 | |
parent | 948c826b9dcbb359870b3a3363ed678534ac5749 [diff] |
Create local_card_migration_manager class to manage local card migration(CL#2). The local_card_migration_manager is the manager to control the local card migration flow, which is similar to the credit_card_save_manager class. The FormDataImporter will trigger the migration when user submit a form using a local card or a server card. If the user is signed-in and sync, and have [more than one local card when use a local card] or [at least one valid local card when use server card], migration will start to fetch legal docs. When successfully fetch the legal docs, it will pop-up first round window to ask user whether to migrate local card. If user agree, it will pop-up second window with all valid local card for upload. If user agree on the second window, we will sequentially upload valid local cards. In this CL, we mainly solve the triggering logic for the migration. The logic is mainly in the FormDataImporter and the ShouldOfferLocalCreditCardMigration() in LocalCardMigrationManager. If the migration requirements are met, we will fetch legal docs from the server. If we successfully fetch the legal docs, we will trigger the first round pop-up window to the user. We also add experimental flag in this CL to enable/disable the migration. For the unittest, we use a variable in the test class as an observer and it is True when successfully fetch the legal docs. We check this variable to test whether the migration is triggered or not. And we also create new constructor in the test_autofill_manager and test_form_data_importer for the new local_card_migration_manager for testing. The triggered two-round pop-ups windows together with their callback functions will be included in the following CLs. Bug: 852904 Change-Id: Iadd17b4e36e12bc9ef17075d0703b796d37ed334 Reviewed-on: https://chromium-review.googlesource.com/1111569 Commit-Queue: Sujie Zhu <sujiezhu@google.com> Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org> Reviewed-by: Jared Saul <jsaul@google.com> Cr-Commit-Position: refs/heads/master@{#575715}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .