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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

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: Autofill test failures on Android. Undo a change to autofill_test_utils.cc. Created 6 years, 6 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/ui/webui/options/autofill_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 75087f672bce7a807592d1d0ab271021170f68e3..6b98cefa1410eda90163cbb4c174a750f1cd4bfa 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -333,6 +333,12 @@ void AutofillOptionsHandler::RegisterMessages() {
personal_data_ = autofill::PersonalDataManagerFactory::GetForProfile(
Profile::FromWebUI(web_ui()));
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ web_ui()->RegisterMessageCallback(
+ "accessAddressBook",
+ base::Bind(&AutofillOptionsHandler::AccessAddressBook,
+ base::Unretained(this)));
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
web_ui()->RegisterMessageCallback(
"removeData",
base::Bind(&AutofillOptionsHandler::RemoveData,
@@ -437,6 +443,12 @@ void AutofillOptionsHandler::LoadAutofillData() {
credit_cards);
}
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+void AutofillOptionsHandler::AccessAddressBook(const base::ListValue* args) {
+ personal_data_->AccessAddressBook();
+}
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
void AutofillOptionsHandler::RemoveData(const base::ListValue* args) {
DCHECK(IsPersonalDataLoaded());

Powered by Google App Engine
This is Rietveld 408576698