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

Unified Diff: chrome/browser/resources/options/autofill_options.js

Issue 301343002: mac: Clean up autofill integration with Address Book. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@autofill_cleanup2_base
Patch Set: test Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/autofill_options.js
diff --git a/chrome/browser/resources/options/autofill_options.js b/chrome/browser/resources/options/autofill_options.js
index 65fb71964ae3b36009ec69e61533028ee7926a55..35182ffa5eba8f00dd1f806c8b96db19f14468cc 100644
--- a/chrome/browser/resources/options/autofill_options.js
+++ b/chrome/browser/resources/options/autofill_options.js
@@ -55,6 +55,19 @@ cr.define('options', function() {
$('autofill-options-confirm').onclick = function(event) {
OptionsPage.closeOverlay();
};
+<if expr="is_macosx">
+ $('autofill-mac-auxiliary-profile-checkbox').onchange = function(event) {
+ if (this.checked) {
+ setTimeout(function() {
+ // Prompt the user to give Chrome access to the user's Address
+ // Book, if the user was not previously prompted. The dialog that
+ // appears blocks the Chrome process, so wait for a small period of
+ // time to allow the checkbox to appear filled in.
+ chrome.send('accessAddressBook');
erikchen 2014/05/30 02:06:15 I assumed that we would need to refresh the list o
Ilya Sherman 2014/05/30 23:39:48 Indeed, we do not show Address Book addresses in t
+ }, 10);
+ }
+ };
+</if>
// TODO(jhawkins): What happens when Autofill is disabled whilst on the
// Autofill options page?

Powered by Google App Engine
This is Rietveld 408576698