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

Unified 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: rebase+one fix 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 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 ca8413a432ef4f842d226054c8e7c8ef5980355e..0ee989de839365f0312eea784e6c7cf6f4717a54 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -590,10 +590,10 @@ void PersonalDataManager::UpdateServerCreditCard(
return;
// Look up by server id, not GUID.
- CreditCard* existing_credit_card = nullptr;
- for (auto it : server_credit_cards_) {
- if (credit_card.server_id() == it->server_id()) {
- existing_credit_card = it;
+ const CreditCard* existing_credit_card = nullptr;
+ for (const auto* server_card : server_credit_cards_) {
+ if (credit_card.server_id() == server_card->server_id()) {
+ existing_credit_card = server_card;
break;
}
}
@@ -620,9 +620,9 @@ void PersonalDataManager::UpdateServerCardBillingAddress(
return;
CreditCard* existing_credit_card = nullptr;
- for (auto it : server_credit_cards_) {
- if (credit_card.guid() == it->guid()) {
- existing_credit_card = it;
+ for (auto* server_card : server_credit_cards_) {
+ if (credit_card.guid() == server_card->guid()) {
+ existing_credit_card = server_card;
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698