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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 286243002: Mac: Autofill should not immediately request access to address book. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing abstract method override to a test class. 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: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 511b160ff3f738127f21eec24c8b2415e01eeebf..8bceedd686b0bc8d9a61a4f6bee5dcdac12f4ca8 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -240,6 +240,28 @@ void AutofillManager::ShowAutofillSettings() {
manager_delegate_->ShowAutofillSettings();
}
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+bool AutofillManager::ShouldShowAccessAddressBookSuggestion(
+ const FormData& form,
+ const FormFieldData& field) {
+ if (!personal_data_)
+ return false;
+ FormStructure* form_structure = NULL;
+ AutofillField* autofill_field = NULL;
+ if (!GetCachedFormAndField(form, field, &form_structure, &autofill_field))
+ return false;
+
+ return personal_data_->ShouldShowAccessAddressBookSuggestion(
+ autofill_field->Type());
+}
+
+bool AutofillManager::AccessAddressBook() {
+ if (!personal_data_)
+ return false;
+ return personal_data_->AccessAddressBook();
+}
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
bool AutofillManager::OnFormSubmitted(const FormData& form,
const TimeTicks& timestamp) {
if (!IsValidFormData(form))
« no previous file with comments | « components/autofill/core/browser/autofill_manager.h ('k') | components/autofill/core/browser/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698