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

Side by Side Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 <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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 void PersonalDataManager::UpdateServerCreditCard( 557 void PersonalDataManager::UpdateServerCreditCard(
558 const CreditCard& credit_card) { 558 const CreditCard& credit_card) {
559 DCHECK_NE(CreditCard::LOCAL_CARD, credit_card.record_type()); 559 DCHECK_NE(CreditCard::LOCAL_CARD, credit_card.record_type());
560 560
561 if (is_off_the_record_ || !database_.get()) 561 if (is_off_the_record_ || !database_.get())
562 return; 562 return;
563 563
564 // Look up by server id, not GUID. 564 // Look up by server id, not GUID.
565 CreditCard* existing_credit_card = nullptr; 565 CreditCard* existing_credit_card = nullptr;
566 for (auto it : server_credit_cards_) { 566 for (auto* it : server_credit_cards_) {
567 if (credit_card.server_id() == it->server_id()) { 567 if (credit_card.server_id() == it->server_id()) {
568 existing_credit_card = it; 568 existing_credit_card = it;
569 break; 569 break;
570 } 570 }
571 } 571 }
572 if (!existing_credit_card) 572 if (!existing_credit_card)
573 return; 573 return;
574 574
575 DCHECK_NE(existing_credit_card->record_type(), credit_card.record_type()); 575 DCHECK_NE(existing_credit_card->record_type(), credit_card.record_type());
576 DCHECK_EQ(existing_credit_card->Label(), credit_card.Label()); 576 DCHECK_EQ(existing_credit_card->Label(), credit_card.Label());
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 break; 1680 break;
1681 } 1681 }
1682 } 1682 }
1683 } 1683 }
1684 } 1684 }
1685 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe( 1685 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe(
1686 profiles_to_delete->size()); 1686 profiles_to_delete->size());
1687 } 1687 }
1688 1688
1689 } // namespace autofill 1689 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698