• erikchen@chromium.org's avatar
    Mac: Autofill should not immediately request access to address book. · 27cd8ff9
    erikchen@chromium.org authored
    If the browser does not yet have permission to access the user's contacts, one
    of the Autofill suggestions has the text "Enable Autofill using Contacts". If
    the user selects that suggestion, the browser will prompt the user for access
    to the user's address book.
    
    The act of clicking the permissions dialog causes Blink to lose its focus on
    the text field, which also dismisses the Autofill popup. If the user has
    granted Chrome access to the address book, the autofill popup will be presented
    again, and filled in.
    
    This CL does not include the image asset, nor does it include the logic to
    display the image asset on the left of the autofill entry.
    
    BUG=139154
    TEST=Run the command `tccutil reset AddressBook` to reset AddressBook
    permissions for all applications. Clear the default Chromium profile:
    `rm -rf ~/Library/Application\ Support/Chromium/Default/`.  Launch Chromium by
    double clicking on it from Finder.  Navigate to
    `https://www.mycontactform.com/samples/change_address.php`. Double click the
    "First Name" field. There should not be a prompt to access your "Contacts".
    There should be exactly 1 autofill entry: "Enable Autofill using Contacts...".
    Clicking that autofill entry should open a system prompt that asks for Contacts
    permissions for Chromium.
    
    Review URL: https://codereview.chromium.org/286243002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274040 0039d316-1c4b-4281-b951-d872f2087c98
    27cd8ff9
autofill_agent.h 11 KB