Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Issue 286243002: Mac: Autofill should not immediately request access to address book. (Closed)

Created:
6 years, 7 months ago by erikchen
Modified:
6 years, 6 months ago
Reviewers:
Ilya Sherman, dcheng
CC:
chromium-reviews, benquan, browser-components-watch_chromium.org, Dane Wallinga, dyu1, estade+watch_chromium.org, Ilya Sherman, rouslan+autofillwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Mac: Autofill should not immediately request access to address book. 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. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274040

Patch Set 1 : More cleanup. #

Total comments: 17

Patch Set 2 : isherman comments. #

Patch Set 3 : Don't assume personal_data_ is not NULL. #

Total comments: 21

Patch Set 4 : Address second round of comments from isherman. #

Total comments: 15

Patch Set 5 : Respond to comments from isherman. #

Total comments: 5

Patch Set 6 : Comments from isherman. #

Patch Set 7 : Add IPCs. #

Total comments: 12

Patch Set 8 : Comments from isherman. #

Total comments: 2

Patch Set 9 : Rebase against top of tree. #

Patch Set 10 : Comment from isherman. #

Patch Set 11 : Add !defined(OS_IOS) to all #ifdefs. #

Patch Set 12 : Add a missing abstract method override to a test class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -19 lines) Patch
M components/autofill.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/browser/content_autofill_driver.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/browser/content_autofill_driver.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M components/autofill/content/common/autofill_messages.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/autofill_agent.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/renderer/autofill_agent.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_driver.h View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M components/autofill/core/browser/autofill_external_delegate.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_external_delegate.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +62 lines, -3 lines 0 comments Download
M components/autofill/core/browser/autofill_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
M components/autofill/core/browser/autofill_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager_mac.mm View 1 2 3 4 5 6 7 8 4 chunks +75 lines, -14 lines 0 comments Download
M components/autofill/core/browser/popup_item_ids.h View 1 chunk +2 lines, -1 line 0 comments Download
M components/autofill/core/browser/test_autofill_driver.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/core/browser/test_autofill_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M components/autofill_strings.grdp View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
erikchen
Please review. Are there any particular tests that you would like to see? The logic ...
6 years, 7 months ago (2014-05-16 22:37:05 UTC) #1
Ilya Sherman
Thanks! https://codereview.chromium.org/286243002/diff/180001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/180001/components/autofill/core/browser/autofill_external_delegate.cc#newcode99 components/autofill/core/browser/autofill_external_delegate.cc:99: labels.push_back(base::ASCIIToUTF16("")); nit: "base::ASCIIToUTF16("")" -> "base::string16()" https://codereview.chromium.org/286243002/diff/180001/components/autofill/core/browser/autofill_external_delegate.cc#newcode100 components/autofill/core/browser/autofill_external_delegate.cc:100: icons.push_back(base::ASCIIToUTF16("americanExpressCC")); ...
6 years, 7 months ago (2014-05-16 22:54:03 UTC) #2
erikchen
PTAL https://codereview.chromium.org/286243002/diff/180001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/180001/components/autofill/core/browser/autofill_external_delegate.cc#newcode99 components/autofill/core/browser/autofill_external_delegate.cc:99: labels.push_back(base::ASCIIToUTF16("")); On 2014/05/16 22:54:02, Ilya Sherman wrote: > ...
6 years, 7 months ago (2014-05-19 20:58:32 UTC) #3
Ilya Sherman
Apologies for the delayed review -- I'm traveling, in Paris atm. https://codereview.chromium.org/286243002/diff/280001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): ...
6 years, 7 months ago (2014-05-21 11:29:15 UTC) #4
erikchen
No problems, enjoy Paris! PTAL https://codereview.chromium.org/286243002/diff/280001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/280001/components/autofill/core/browser/autofill_external_delegate.cc#newcode102 components/autofill/core/browser/autofill_external_delegate.cc:102: } On 2014/05/21 11:29:15, ...
6 years, 7 months ago (2014-05-21 22:00:54 UTC) #5
Ilya Sherman
Thanks, Erik. https://codereview.chromium.org/286243002/diff/280001/components/autofill/core/browser/autofill_manager.cc File components/autofill/core/browser/autofill_manager.cc (right): https://codereview.chromium.org/286243002/diff/280001/components/autofill/core/browser/autofill_manager.cc#newcode256 components/autofill/core/browser/autofill_manager.cc:256: for (auto it : form_structures_) { On ...
6 years, 7 months ago (2014-05-22 15:13:58 UTC) #6
erikchen
isherman: PTAL https://codereview.chromium.org/286243002/diff/360001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/360001/components/autofill/core/browser/autofill_external_delegate.cc#newcode179 components/autofill/core/browser/autofill_external_delegate.cc:179: redisplay_autofill_ = true; On 2014/05/22 15:13:59, Ilya ...
6 years, 7 months ago (2014-05-22 20:40:58 UTC) #7
Ilya Sherman
Thanks! Just one last point of contention: https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc#newcode190 components/autofill/core/browser/autofill_external_delegate.cc:190: redisplay_popop_on_focus_lost_ = ...
6 years, 7 months ago (2014-05-23 15:47:10 UTC) #8
erikchen
PTAL https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc#newcode190 components/autofill/core/browser/autofill_external_delegate.cc:190: redisplay_popop_on_focus_lost_ = true; On 2014/05/23 15:47:10, Ilya Sherman ...
6 years, 7 months ago (2014-05-23 17:19:38 UTC) #9
Ilya Sherman
https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/400001/components/autofill/core/browser/autofill_external_delegate.cc#newcode190 components/autofill/core/browser/autofill_external_delegate.cc:190: redisplay_popop_on_focus_lost_ = true; On 2014/05/23 17:19:38, erikchen1 wrote: > ...
6 years, 6 months ago (2014-05-28 06:43:27 UTC) #10
erikchen
I just tried your suggestion. It doesn't quite work because my comment was inaccurate. After ...
6 years, 6 months ago (2014-05-28 18:31:17 UTC) #11
erikchen
isherman: PTAL
6 years, 6 months ago (2014-05-29 00:09:17 UTC) #12
Ilya Sherman
Thanks! https://codereview.chromium.org/286243002/diff/500001/components/autofill/content/browser/content_autofill_driver.cc File components/autofill/content/browser/content_autofill_driver.cc (right): https://codereview.chromium.org/286243002/diff/500001/components/autofill/content/browser/content_autofill_driver.cc#newcode192 components/autofill/content/browser/content_autofill_driver.cc:192: autofill_manager_.get(), nit: Can this skip the AutofillManager, and ...
6 years, 6 months ago (2014-05-29 01:28:23 UTC) #13
erikchen
isherman: PTAL. You'll want to diff patch set 9 against patch set 8, as patch ...
6 years, 6 months ago (2014-05-29 20:31:31 UTC) #14
Ilya Sherman
LGTM with a final nit. Thanks, Erik! https://codereview.chromium.org/286243002/diff/520001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/520001/components/autofill/core/browser/autofill_external_delegate.cc#newcode234 components/autofill/core/browser/autofill_external_delegate.cc:234: // Reissues ...
6 years, 6 months ago (2014-05-29 20:35:08 UTC) #15
erikchen
https://codereview.chromium.org/286243002/diff/520001/components/autofill/core/browser/autofill_external_delegate.cc File components/autofill/core/browser/autofill_external_delegate.cc (right): https://codereview.chromium.org/286243002/diff/520001/components/autofill/core/browser/autofill_external_delegate.cc#newcode234 components/autofill/core/browser/autofill_external_delegate.cc:234: // Reissues the most recent query, which will reopen ...
6 years, 6 months ago (2014-05-29 20:47:26 UTC) #16
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 6 months ago (2014-05-29 20:47:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/286243002/580001
6 years, 6 months ago (2014-05-29 20:49:34 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 06:57:20 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-30 07:04:11 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/70594) ios_rel_device on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device/builds/146149) ios_rel_device_ninja ...
6 years, 6 months ago (2014-05-30 07:04:11 UTC) #21
erikchen
dcheng: looking for an OWNER review of components/autofill/content/common/autofill_messages.h
6 years, 6 months ago (2014-05-30 17:15:13 UTC) #22
dcheng
IPC changes LGTM
6 years, 6 months ago (2014-05-30 17:55:06 UTC) #23
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 6 months ago (2014-05-30 19:03:41 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/286243002/600001
6 years, 6 months ago (2014-05-30 19:06:20 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 23:44:34 UTC) #26
erikchen
The CQ bit was unchecked by erikchen@chromium.org
6 years, 6 months ago (2014-05-30 23:54:17 UTC) #27
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 6 months ago (2014-05-31 00:00:06 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/286243002/620001
6 years, 6 months ago (2014-05-31 00:06:26 UTC) #29
commit-bot: I haz the power
6 years, 6 months ago (2014-05-31 05:14:49 UTC) #30
Message was sent while issue was closed.
Change committed as 274040

Powered by Google App Engine
This is Rietveld 408576698