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

Unified Diff: components/autofill/core/browser/personal_data_manager.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: Address comments from isherman. 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/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index 1d4173e592564b7f0d24937d8cbc9d994ddbea25..10540c38f93a4666c730e34446fd2712a1fc6dac 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -525,9 +525,15 @@ bool PersonalDataManager::IsDataLoaded() const {
}
const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles() const {
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ if (!pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook)) {
+ return web_profiles();
+ }
Ilya Sherman 2014/06/02 22:54:27 nit: No need for curly braces; ditto below.
erikchen 2014/06/03 01:34:19 Done.
+#else
if (!pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled)) {
return web_profiles();
}
+#endif
Ilya Sherman 2014/06/02 22:54:27 nit: "// defined(OS_MACOSX) && !defined(OS_IOS)"
erikchen 2014/06/03 01:34:19 I've added the comment. As far as I can know, the
Ilya Sherman 2014/06/03 23:48:59 I think the trailing comment is strongly recommend
erikchen 2014/06/04 01:51:25 I've added trailing comments to all #endif's conta
profiles_.clear();

Powered by Google App Engine
This is Rietveld 408576698