Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 defined(OS_MACOSX) && !defined(OS_IOS) | |
| 529 if (!pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook)) { | |
| 530 return web_profiles(); | |
| 531 } | |
|
Ilya Sherman
2014/06/02 22:54:27
nit: No need for curly braces; ditto below.
erikchen
2014/06/03 01:34:19
Done.
| |
| 532 #else | |
| 528 if (!pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled)) { | 533 if (!pref_service_->GetBoolean(prefs::kAutofillAuxiliaryProfilesEnabled)) { |
| 529 return web_profiles(); | 534 return web_profiles(); |
| 530 } | 535 } |
| 536 #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
| |
| 531 | 537 |
| 532 profiles_.clear(); | 538 profiles_.clear(); |
| 533 | 539 |
| 534 // Populates |auxiliary_profiles_|. | 540 // Populates |auxiliary_profiles_|. |
| 535 LoadAuxiliaryProfiles(); | 541 LoadAuxiliaryProfiles(); |
| 536 | 542 |
| 537 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); | 543 profiles_.insert(profiles_.end(), web_profiles_.begin(), web_profiles_.end()); |
| 538 profiles_.insert(profiles_.end(), | 544 profiles_.insert(profiles_.end(), |
| 539 auxiliary_profiles_.begin(), auxiliary_profiles_.end()); | 545 auxiliary_profiles_.begin(), auxiliary_profiles_.end()); |
| 540 return profiles_; | 546 return profiles_; |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1072 | 1078 |
| 1073 return std::string(); | 1079 return std::string(); |
| 1074 } | 1080 } |
| 1075 | 1081 |
| 1076 void PersonalDataManager::EnabledPrefChanged() { | 1082 void PersonalDataManager::EnabledPrefChanged() { |
| 1077 default_country_code_.clear(); | 1083 default_country_code_.clear(); |
| 1078 NotifyPersonalDataChanged(); | 1084 NotifyPersonalDataChanged(); |
| 1079 } | 1085 } |
| 1080 | 1086 |
| 1081 } // namespace autofill | 1087 } // namespace autofill |
| OLD | NEW |