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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 14564003: Make PersonalDataManager use GetCreditCards() (rather than using credit_cards_ directly) so Autofill (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: chrome/browser/ui/webui/options/autofill_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 8177546efba95f7df5c9d933a80079a51cc20238..a1742fd80df9654bacaf843480715afd601912bd 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -389,10 +389,10 @@ void AutofillOptionsHandler::LoadAutofillData() {
web_ui()->CallJavascriptFunction("AutofillOptions.setAddressList", addresses);
ListValue credit_cards;
- for (std::vector<CreditCard*>::const_iterator i =
- personal_data_->credit_cards().begin();
- i != personal_data_->credit_cards().end(); ++i) {
- const CreditCard* card = *i;
+ const std::vector<CreditCard*>& cards = personal_data_->GetCreditCards();
+ for (std::vector<CreditCard*>::const_iterator iter = cards.begin();
+ iter != cards.end(); ++iter) {
+ const CreditCard* card = *iter;
// TODO(estade): this should be a dictionary.
ListValue* entry = new ListValue();
entry->Append(new StringValue(card->guid()));

Powered by Google App Engine
This is Rietveld 408576698