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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.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, 7 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 | Annotate | Revision Log
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 "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 suggested_cc_billing_.AddKeyedItem( 1753 suggested_cc_billing_.AddKeyedItem(
1754 kAddNewItemKey, 1754 kAddNewItemKey,
1755 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS)); 1755 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS));
1756 suggested_cc_billing_.AddKeyedItem( 1756 suggested_cc_billing_.AddKeyedItem(
1757 kManageItemsKey, 1757 kManageItemsKey,
1758 l10n_util::GetStringUTF16( 1758 l10n_util::GetStringUTF16(
1759 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); 1759 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS));
1760 } 1760 }
1761 } else { 1761 } else {
1762 PersonalDataManager* manager = GetManager(); 1762 PersonalDataManager* manager = GetManager();
1763 const std::vector<CreditCard*>& cards = manager->credit_cards(); 1763 const std::vector<CreditCard*>& cards = manager->GetCreditCards();
1764 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 1764 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
1765 for (size_t i = 0; i < cards.size(); ++i) { 1765 for (size_t i = 0; i < cards.size(); ++i) {
1766 suggested_cc_.AddKeyedItemWithIcon( 1766 suggested_cc_.AddKeyedItemWithIcon(
1767 cards[i]->guid(), 1767 cards[i]->guid(),
1768 cards[i]->Label(), 1768 cards[i]->Label(),
1769 rb.GetImageNamed(cards[i]->IconResourceId())); 1769 rb.GetImageNamed(cards[i]->IconResourceId()));
1770 } 1770 }
1771 1771
1772 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); 1772 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles();
1773 const std::string app_locale = g_browser_process->GetApplicationLocale(); 1773 const std::string app_locale = g_browser_process->GetApplicationLocale();
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 url, 2373 url,
2374 content::PAGE_TRANSITION_AUTO_BOOKMARK); 2374 content::PAGE_TRANSITION_AUTO_BOOKMARK);
2375 params.disposition = NEW_FOREGROUND_TAB; 2375 params.disposition = NEW_FOREGROUND_TAB;
2376 chrome::Navigate(&params); 2376 chrome::Navigate(&params);
2377 #else 2377 #else
2378 // TODO(estade): use TabModelList? 2378 // TODO(estade): use TabModelList?
2379 #endif 2379 #endif
2380 } 2380 }
2381 2381
2382 } // namespace autofill 2382 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698