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 <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 void PersonalDataManager::UpdateServerCardBillingAddress( | 625 void PersonalDataManager::UpdateServerCardBillingAddress( |
626 const CreditCard& credit_card) { | 626 const CreditCard& credit_card) { |
627 DCHECK_NE(CreditCard::LOCAL_CARD, credit_card.record_type()); | 627 DCHECK_NE(CreditCard::LOCAL_CARD, credit_card.record_type()); |
628 | 628 |
629 if (!database_.get()) | 629 if (!database_.get()) |
630 return; | 630 return; |
631 | 631 |
632 CreditCard* existing_credit_card = nullptr; | 632 CreditCard* existing_credit_card = nullptr; |
633 for (auto* server_card : server_credit_cards_) { | 633 for (auto* server_card : server_credit_cards_) { |
634 if (credit_card.guid() == server_card->guid()) { | 634 if (credit_card.server_id() == server_card->server_id()) { |
635 existing_credit_card = server_card; | 635 existing_credit_card = server_card; |
636 break; | 636 break; |
637 } | 637 } |
638 } | 638 } |
639 if (!existing_credit_card | 639 if (!existing_credit_card |
640 || existing_credit_card->billing_address_id() == | 640 || existing_credit_card->billing_address_id() == |
641 credit_card.billing_address_id()) { | 641 credit_card.billing_address_id()) { |
642 return; | 642 return; |
643 } | 643 } |
644 | 644 |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 if (profile_to_merge->IsVerified()) | 1755 if (profile_to_merge->IsVerified()) |
1756 break; | 1756 break; |
1757 } | 1757 } |
1758 } | 1758 } |
1759 } | 1759 } |
1760 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe( | 1760 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe( |
1761 profiles_to_delete->size()); | 1761 profiles_to_delete->size()); |
1762 } | 1762 } |
1763 | 1763 |
1764 } // namespace autofill | 1764 } // namespace autofill |
OLD | NEW |