summaryrefslogtreecommitdiffstats
path: root/components/autofill
Commit message (Collapse)AuthorAgeFilesLines
* [iOS/GN] Fix compilation of ios_chrome_unittests with gn.sdefresne2016-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Get GN in sync with gyp by adding missing dependencies, removing the obsoletes dependencies and adding missing files and targets. Change the toolchain when targetting iOS devices to not build fat binaries as this break the "gn gen"-time selection of the level of optimisation to use from skia and libwebp. Instead, building for devices on iOS is now similar to other platforms (i.e. the arch is selected via "target_cpu" with "arm" an alias for "armv7"). Fixes the following errors: Undefined symbols for architecture arm64: "_VP8DspInitNEON", referenced from: _VP8DspInit in dec.o ... BUG=459705,596237 Review URL: https://codereview.chromium.org/1810423002 Cr-Commit-Position: refs/heads/master@{#383416}
* [GN] Fix missing public dependency.sdefresne2016-03-251-2/+4
| | | | | | | | | | | | //components/autofill/core/browser public headers depends on headers generated by //components/autofill/core/browser/proto, so change the dependency from private to public. BUG=None Review URL: https://codereview.chromium.org/1806853008 Cr-Commit-Position: refs/heads/master@{#383298}
* Add more out of line copy ctors for complex classes.vmpstr2016-03-242-0/+3
| | | | | | | | | | | | | | | This patch adds the remaining copy constructors for complex classes. After this patch, it should be possible to enable the heavy class copy constructor checks by default. R=thakis@chromium.org, dcheng@chromium.org TBR=jam@chromium.org BUG=436357 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1825273002 Cr-Commit-Position: refs/heads/master@{#383131}
* Added the uploads for the new credit card types.sebsg2016-03-237-22/+390
| | | | | | | | | | | Added the DisambiguateUploadTypes method that uses the context from the other fields to disambiguate a field that has multiple upload types. BUG=589535, 589536 TEST=AutofillManagerTest Review URL: https://codereview.chromium.org/1821053002 Cr-Commit-Position: refs/heads/master@{#382852}
* Some forms have "Address Nickname" or "Address Label" fields that are used ↵sebsg2016-03-233-1/+4
| | | | | | | | | | | | | to identify an address. These fields were filled as address line 1. Added a regex to find those specific fields and not fill them. BUG=596913 TEST=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1825133002 Cr-Commit-Position: refs/heads/master@{#382851}
* Add RetainedRef uses where needed.vmpstr2016-03-211-1/+2
| | | | | | | | | | | | | | | This patch adds RetainedRef uses where they are required. These changes will be required when we remove automatic unwrapping of scoped_refptrs in Bind. Please see the bug for more context. R=tzik@chromium.org, thakis@chromium.org, danakj@chromium.org BUG=589048 Review URL: https://codereview.chromium.org/1815363002 Cr-Commit-Position: refs/heads/master@{#382371}
* Don't ever attempt to upload credit cards whose numbers match.jdonnelly2016-03-184-4/+53
| | | | | | | | | | Previously, we were using the logic derived from local card handling where if the name or expiration date was different we would offer to save a card even if we already had an autofill entry with that exact card number. But in the case of upload, this will never succeed. BUG=535784 Review URL: https://codereview.chromium.org/1808613004 Cr-Commit-Position: refs/heads/master@{#381974}
* Added code to try getting the full text value and abbreviation of a possible ↵sebsg2016-03-184-4/+32
| | | | | | | | | | | state and compare these values to the saved profile's state value. BUG=595734 TEST=AutofillManagerTest Review URL: https://codereview.chromium.org/1814883002 Cr-Commit-Position: refs/heads/master@{#381973}
* Some text state fields have a maxlength of two. This can cause problem for ↵sebsg2016-03-172-0/+71
| | | | | | | | | | | some states. For example New York is filled as NE (Nebraska) instead of NY. BUG=595104 TEST=AutofillFieldTest Review URL: https://codereview.chromium.org/1811543002 Cr-Commit-Position: refs/heads/master@{#381792}
* Autofill & passwords: Replace NavigationEntryCommitted with DidFinishNavigationvabr2016-03-172-5/+7
| | | | | | | | | | The former is a possible candidate for deletion, the latter is a suitable replacement in the new navigation API. BUG=576287 Review URL: https://codereview.chromium.org/1806593002 Cr-Commit-Position: refs/heads/master@{#381725}
* Added the following cvc regexes to make the heuristics work on sites of the ↵sebsg2016-03-161-0/+1
| | | | | | | | | | | | | | | top 100. "security.?number", "card.?pin" and "c-v-v" to fix net-a-porter.com, efollet.com and m.jcp.com respectively. BUG=595096 TEST=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1807463003 Cr-Commit-Position: refs/heads/master@{#381493}
* Since the site hal-india.com uses "Contact Number" to label phone number ↵sebsg2016-03-161-8/+8
| | | | | | | | | | | fields, the regex "contact.?number" was added. BUG=594090 TEST=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1808593003 Cr-Commit-Position: refs/heads/master@{#381453}
* [Autofill] Possibly import more than one address profile per form submission.mathp2016-03-166-53/+331
| | | | | | | | | | | Each section is considered independently for profile import. BUG=579235 TEST=PersonalDataManagerTest Review URL: https://codereview.chromium.org/1781033002 Cr-Commit-Position: refs/heads/master@{#381412}
* Remove kAutofillWalletSyncExperimentEnabled.jdonnelly2016-03-1514-260/+12
| | | | | | | | | | | | This sync experiment has been at 100% of all users for a while. Also, add the autofill_wallet type to sync/tools/testserver/chromiumsync.py. Previously, AutofillWalletDataTypeController::IsEnabled was returning false in the test environment because the sync setting was false. Now that we enable by default, the sync integration tests are covering this type. Which I assume is a good thing. BUG=594182 Review URL: https://codereview.chromium.org/1785923010 Cr-Commit-Position: refs/heads/master@{#381304}
* Fix AddressField "lookup" fields ignore logic.sense2016-03-141-5/+4
| | | | | | | | | | | | | | | In http://crbug.com/427622 were added ignore of "lookup"-named address fields. This ignore moves scanner forward, and if ignored field is the last in the form, then next Parse* calls inside of AddressField::Parse is invalid. This fix moves ignore logic to the beginning of AddressField::Parse. R=estade@chromium.org BUG=594475 Review URL: https://codereview.chromium.org/1797793003 Cr-Commit-Position: refs/heads/master@{#380956}
* [Autofill] Fix heuristics to detect consecutive CVCs.sebsg2016-03-143-13/+225
| | | | | | | | | | Added a check after parsing a cvc. If it's the only type parsed so far, check the previous field. If it's also a cvc, just label the current field as a cvc without looking at the next fields. This also fixes some cases where we would label some names as cc-names. BUG=591498 Review URL: https://codereview.chromium.org/1753253003 Cr-Commit-Position: refs/heads/master@{#380916}
* Adds the phone extension type for autocomplete attributes and server ↵sebsg2016-03-136-11/+27
| | | | | | | | | | | predictions. BUG=593031 TEST=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1774153002 Cr-Commit-Position: refs/heads/master@{#380905}
* Cleanup: roll AutofillCCInfoBarDelegate into ↵jdonnelly2016-03-115-221/+112
| | | | | | | | | | | | AutofillSaveCardInfoBarDelegateMobile. The former is no longer used on desktop and therefore no longer needs to be maintained as a separate class. Depends on https://codereview.chromium.org/1761073005/ which removes the last reference. BUG= Review URL: https://codereview.chromium.org/1780443002 Cr-Commit-Position: refs/heads/master@{#380650}
* Introduce a constant for the midline horizontal ellipsis character.jdonnelly2016-03-103-5/+9
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1781833002 Cr-Commit-Position: refs/heads/master@{#380308}
* Replace base::Tuple in //components with std::tupletzik2016-03-093-15/+20
| | | | | | | | BUG=554987 Review URL: https://codereview.chromium.org/1774873003 Cr-Commit-Position: refs/heads/master@{#380237}
* blink: Rename modules/ method to prefix with get when they collide.Dana Jansens2016-03-092-4/+4
| | | | | | | | | | | | | | | | | | | This focuses on modules/ to rename methods that are named foo() and that return a Foo*, which will have collisions when foo() is renamed to Foo() in chromium style. This patch uses the following to do many of the replacements, so it's a bit on the larger side.. git gs '\b$foo()'|grep '\.\(cpp\|h\|cc\):'|cut -d: -f1|sort|uniq|xargs sed -ie 's/\b$foo()/$getFoo()/g' R=haraken@chromium.org TBR=brettw, chrishtr BUG=582312 Review URL: https://codereview.chromium.org/1773813007 . Cr-Commit-Position: refs/heads/master@{#380209}
* Enable the save card bubble on Mac without a flag.jdonnelly2016-03-092-10/+0
| | | | | | | | BUG=566271 Review URL: https://codereview.chromium.org/1761073005 Cr-Commit-Position: refs/heads/master@{#380073}
* [Autofill] Fix heuristics to detect cc-number on united.com.sebsg2016-03-041-3/+4
| | | | | | | | | | The reason was that one of the cc-number fields has type="password", and we didn't support this type for cc-number fields. BUG=591166 Review URL: https://codereview.chromium.org/1754793003 Cr-Commit-Position: refs/heads/master@{#379287}
* Allowing partial matches on Credit Card type.tmartino2016-03-016-112/+100
| | | | | | | | BUG=580801 Review URL: https://codereview.chromium.org/1727803002 Cr-Commit-Position: refs/heads/master@{#378599}
* Added two new field types : CREDIT_CARD_NAME_FIRST and ↵sebsg2016-03-0132-303/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREDIT_CARD_NAME_LAST. Modified the heuristics to recognize these two new fields. Added code to be able to fill these new fields with the data already available. This will fix Keurig.com and sites like this example: https://f117f41fdbc2c18ce6861c4fac2e807ecf7f1d75.googledrive.com/host/0B3xzZ-vFr2LRU0FlVEhGa09uSDA Since it's still pretty conservative. It won't fix sites like Cabelas.com where the fields are named "firstname" and "lastname" The original heuristics predictions on Keurig.com were: NAME_FIRST | card_firstNameOnCard | First Name* NAME_LAST | card_lastNameOnCard | Last Name* UNKNOWN_TYPE | card_accountNumber | Card Number* UNKNOWN_TYPE | card_cardType | Card Type UNKNOWN_TYPE | | Please select a card type UNKNOWN_TYPE | card_expirationMonth | Expiration Date* UNKNOWN_TYPE | | Month CREDIT_CARD_EXP_MONTH | card_expirationYear | Expiration Date* CREDIT_CARD_EXP_4_DIGIT_YEAR | | Year | CREDIT_CARD_VERIFICATION_CODE | card_cvNumber | Security Code* TBR=thestig@chromium.org BUG=579174 TEST=AutofillManagerTest, FormStructureTest Review URL: https://codereview.chromium.org/1694443004 Cr-Commit-Position: refs/heads/master@{#378551}
* [Autofill] Fix expiration month filling bug.sebsg2016-03-012-3/+16
| | | | | | | | | | Fix credit card expiration month filling for cases where there is a placeholder with a non-numerical associated value. BUG=590048 Review URL: https://codereview.chromium.org/1753463002 Cr-Commit-Position: refs/heads/master@{#378444}
* [Autofill] Replace list by deque.kenjitoyama2016-02-271-2/+2
| | | | | | | | | | | | | | std::list is really slow due to cache locality. std::deque offers the same interface (and a bit more) but it uses vectors underneath so it's a lot faster. Maybe we could even use std::vector but it would require some experiments and some real-world data to validate if it'll beat std::deque. TESTED=*AutofillManager* Review URL: https://codereview.chromium.org/1741913002 Cr-Commit-Position: refs/heads/master@{#378143}
* Add UMA timing metrics for Autofill.kenjitoyama2016-02-275-0/+68
| | | | | | | | TESTED=*AutofillMetricsTest* Review URL: https://codereview.chromium.org/1737903004 Cr-Commit-Position: refs/heads/master@{#378123}
* [Autofill] All parsers now see the same immutable input.kenjitoyama2016-02-278-40/+79
| | | | | | | | | | | | | | This will allow parsers to take independent decisions and vote for the types they detect. The logic in FieldCandidates will then select the winner based on all these votes. BUG=589211 TESTED=FormStructureBrowserTest,*FieldTest*,*FieldCandidates* Review URL: https://codereview.chromium.org/1732453002 Cr-Commit-Position: refs/heads/master@{#378047}
* Make the name requirements for credit card upload stricter.jdonnelly2016-02-263-17/+114
| | | | | | | | | | These new requirements, which check to see if there are non-matching names, but where the matching logic is case insensitive and ignores middle initials, are intended to match the validation done by Payments on the server. BUG=535784 Review URL: https://codereview.chromium.org/1730953003 Cr-Commit-Position: refs/heads/master@{#377993}
* CREDENTIAL: Disable auto sign-in by default for existing credentials.mkwst2016-02-261-1/+1
| | | | | | | | | | | | The changes to libsecret and gnome backends are fairly hideous, but I am assured that this is How Things are Done. *sigh* BUG=587440 R=vasilii@chromium.org Review URL: https://codereview.chromium.org/1734193003 Cr-Commit-Position: refs/heads/master@{#377884}
* CREDENTIAL: Convert federations from URLs to origins throughout.mkwst2016-02-262-5/+7
| | | | | | | | | | | | | | | | | | | | | We've been loosely treating federations as URLs, as it was simple and easy. That laxness, however, has caused some issues with the Android integration, as they are doing exact string comparisons as opposed to origin comparisons. In particular, they expect the serialization stored to sync to exclude the trailing '/'. This patch converts the field to an origin throughout, which ensures both that the serialization matches Android's expectations, but also that we're properly excluding paths and etc. from the comparisons we make in various places in the codebase. BUG=589016 R=vabr@chromium.org, vasilii@chromium.org, jochen@chromium.org TBR=marq@chromium.org Review URL: https://codereview.chromium.org/1723583004 Cr-Commit-Position: refs/heads/master@{#377834}
* Modifying Autofill common prefix logic to discard short field names.tmartino2016-02-263-33/+52
| | | | | | | | | | Split from https://codereview.chromium.org/1727803002 BUG=580801 Review URL: https://codereview.chromium.org/1729893003 Cr-Commit-Position: refs/heads/master@{#377763}
* components: Add out-of-line copy ctors for complex classes.vmpstr2016-02-2516-0/+28
| | | | | | | | | | | | | | This patch adds out of line copy constructors for classes that our clang-plugin considers heavy. This is an effort to enable copy constructor checks by default. BUG=436357 R=jochen@chromium.org, dcheng@chromium.org, thakis@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1728033002 Cr-Commit-Position: refs/heads/master@{#377717}
* A credit card type prediction made by the heuristics or the server now ↵sebsg2016-02-254-8/+68
| | | | | | | | | | | overrides and unrecognized autocomplete attribute BUG=580897 TEST=AutofillFieldTest, AutofillManagerTest Review URL: https://codereview.chromium.org/1661563002 Cr-Commit-Position: refs/heads/master@{#377469}
* Introduce FieldCandidates.kenjitoyama2016-02-2325-468/+722
| | | | | | | | | | | | | | | Instead of taking hard decisions, parsers and other heuristics are now able to give scores to their detected types. This allows having different strategies with varying degrees of confidence, allowing us to be more precise and even have more recall. In a future CL, we will also be able to have all type heuristics seeing the entire form instead of a mutable structure passed around that is incrementally modified. TESTED=FormStructureBrowserTest,*FieldTest*,*FieldCandidates* Review URL: https://codereview.chromium.org/1724553002 Cr-Commit-Position: refs/heads/master@{#377122}
* Sending generated vote on password generation.dvadym2016-02-239-17/+66
| | | | | | | | | | | | The generating of password by user is strong indication that the current form is suitable for generation and we can use it for improving our heuristics. This patch adds |generation_event| to uploaded field vote (in AutofillField structure and in AutofillUploadContents proto) with information about generation event which happened. BUG=552420 Review URL: https://codereview.chromium.org/1686063004 Cr-Commit-Position: refs/heads/master@{#376968}
* Fix regression in serialization of autofill::FormFieldData.jam2016-02-203-7/+8
| | | | | | | | | | I didn't realize this data structure is saved to disk when I changed a size_t to a uint32_t in r374241. The change landed 10 days ago, so in the meantime canary and dev channel users would have faced deserialization errors. However it hasn't shipped to beta. The fix is to switch that struct back to a 64 bit type. BUG=581409 Review URL: https://codereview.chromium.org/1715763003 Cr-Commit-Position: refs/heads/master@{#376598}
* Remove document.defaultCharsetphilipj2016-02-181-2/+1
| | | | | | | | | | | | | | | Intent to Deprecate and Remove: https://groups.google.com/a/chromium.org/d/msg/blink-dev/pWSb_tq13Kg/Dmk59Fb9AQAJ The removed Android test depended on defaultCharset. There is already another test that verifies that the setting affects the default encoding: LayoutTests/http/tests/download/default-encoding.html BUG=567738 Review URL: https://codereview.chromium.org/1707473002 Cr-Commit-Position: refs/heads/master@{#376170}
* Relax credit card upload ZIP code matching rule.jdonnelly2016-02-172-6/+65
| | | | | | | | | | If either is a prefix of the other, allow upload. This allows 5-digit zips to match zip+4 codes that start with the same 5 digits without hardcoding any specifics about how postal codes are represented. BUG=535784 Review URL: https://codereview.chromium.org/1703723002 Cr-Commit-Position: refs/heads/master@{#375998}
* [ios] Cleaned up Chrome*WebViewWebTest predeclarations.eugenebut2016-02-171-3/+0
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1704653003 Cr-Commit-Position: refs/heads/master@{#375886}
* [Autofill] Fill fields if they contain a default value.mathp2016-02-161-5/+11
| | | | | | | | | | | Previously, would only fill empty fields. Now fills fields that are non-empty, but whose values corresponds to the "value" attribute, meaning it's been the same value since page load. BUG=586806 TEST=FormAutofillTest browser_tests Review URL: https://codereview.chromium.org/1699993002 Cr-Commit-Position: refs/heads/master@{#375694}
* [ios] Removed FormStructureBrowserTestIos from AutofillManager friends.eugenebut2016-02-141-3/+0
| | | | | | | | | | FormStructureBrowserTestIos does not exist anymore. BUG=None Review URL: https://codereview.chromium.org/1661803002 Cr-Commit-Position: refs/heads/master@{#375391}
* Don't offer to save/upload credit cards that matched masked cards.jdonnelly2016-02-135-45/+10
| | | | | | | | | | | | Historically, we've offered to save cards when they match a masked card because it's possible that it's actually a different card. However, these circumstances are unlikely and the same circumstances arise now that we allow upload of local cards. If the user has either already uploaded a local card or they have the same card saved locally and entered in Payments from another source, they will be asked to upload this card even though it's already present as a masked card. The crash regression tested for in DontOfferToSavePaymentsCard is no longer possible since we don't check recently_unmasked_cards_ so I've removed that. BUG=535784 Review URL: https://codereview.chromium.org/1698543002 Cr-Commit-Position: refs/heads/master@{#375368}
* [Autofill] Fix CVS.com Credit Card checkout.kenjitoyama2016-02-121-3/+3
| | | | | | | | | | | | cvs.com appends Credit Card fields with "field" (i.e. "ccfield", "expfield" and "cvvfield"). This CL adds more regex rules to also match them. BUG=586252 TESTED=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1692003002 Cr-Commit-Position: refs/heads/master@{#375188}
* [Autofill] When getting matching types for upload, check for empty ↵mathp2016-02-122-1/+4
| | | | | | | | | | canonicalized string. BUG=585503 Review URL: https://codereview.chromium.org/1682803002 Cr-Commit-Position: refs/heads/master@{#375176}
* Refactoring of ParseFormFields().kenjitoyama2016-02-124-43/+37
| | | | | | | | | | | Makes it a pure function, introduces small optimizations and simplifies its calling sites. TESTED=FormStructureBrowserTest Review URL: https://codereview.chromium.org/1688413002 Cr-Commit-Position: refs/heads/master@{#375114}
* [libphonenumber] move phonenumber_api.h up one levelmathp2016-02-112-2/+2
| | | | | | | | | | | In preparation for DEPS change coming. BUG=585286 TBR=tedchoc Review URL: https://codereview.chromium.org/1695483002 Cr-Commit-Position: refs/heads/master@{#374955}
* [Autofill] Add label and parseable_name to predictions debug.kenjitoyama2016-02-115-10/+25
| | | | | | | | | | | This makes debugging heuristics easier because we can now see what we're detecting as label and names for each form field. Please see screenshot at https://drive.google.com/file/d/0ByNLDGiNy51OWmQtdER3ZHdWUGs/view?usp=sharing Review URL: https://codereview.chromium.org/1686843002 Cr-Commit-Position: refs/heads/master@{#374947}
* Autofill server-side heuristics for 2 fields password form.dvadym2016-02-117-3/+56
| | | | | | | | | | This patch makes sending votes and queries for forms that contain 2 fields and both of them are passwords. We need to get server-side heuristics for such forms, since some change password forms have this type and we want to support password generation on them. BUG=552420 Review URL: https://codereview.chromium.org/1670763006 Cr-Commit-Position: refs/heads/master@{#374883}