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

Side by Side 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: Fix a cross-platform problem. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 iter != credit_cards_.end(); ++iter) { 518 iter != credit_cards_.end(); ++iter) {
519 (*iter)->GetNonEmptyTypes(app_locale_, non_empty_types); 519 (*iter)->GetNonEmptyTypes(app_locale_, non_empty_types);
520 } 520 }
521 } 521 }
522 522
523 bool PersonalDataManager::IsDataLoaded() const { 523 bool PersonalDataManager::IsDataLoaded() const {
524 return is_data_loaded_; 524 return is_data_loaded_;
525 } 525 }
526 526
527 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles() const { 527 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles() const {
528 if (!pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled)) { 528 #if defined(OS_MACOSX) && !defined(OS_IOS)
529 if (!pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook))
529 return web_profiles(); 530 return web_profiles();
530 } 531 #else
Ilya Sherman 2014/06/03 23:48:59 nit: Should this be only on Android?
erikchen 2014/06/04 01:51:26 After the revert of the rename of the preference,
532 if (!pref_service_->GetBoolean(
533 prefs::kAutofillAndroidAuxiliaryProfilesEnabled))
534 return web_profiles();
535 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
531 536
532 profiles_.clear(); 537 profiles_.clear();
533 538
534 // Populates |auxiliary_profiles_|. 539 // Populates |auxiliary_profiles_|.
535 LoadAuxiliaryProfiles(); 540 LoadAuxiliaryProfiles();
536 541
537 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); 542 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end());
538 profiles_.insert(profiles_.end(), 543 profiles_.insert(profiles_.end(),
539 auxiliary_profiles_.begin(), auxiliary_profiles_.end()); 544 auxiliary_profiles_.begin(), auxiliary_profiles_.end());
540 return profiles_; 545 return profiles_;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1077
1073 return std::string(); 1078 return std::string();
1074 } 1079 }
1075 1080
1076 void PersonalDataManager::EnabledPrefChanged() { 1081 void PersonalDataManager::EnabledPrefChanged() {
1077 default_country_code_.clear(); 1082 default_country_code_.clear();
1078 NotifyPersonalDataChanged(); 1083 NotifyPersonalDataChanged();
1079 } 1084 }
1080 1085
1081 } // namespace autofill 1086 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698