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

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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 suggested_cc_billing_.AddKeyedItem( 1763 suggested_cc_billing_.AddKeyedItem(
1764 kAddNewItemKey, 1764 kAddNewItemKey,
1765 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS)); 1765 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS));
1766 suggested_cc_billing_.AddKeyedItem( 1766 suggested_cc_billing_.AddKeyedItem(
1767 kManageItemsKey, 1767 kManageItemsKey,
1768 l10n_util::GetStringUTF16( 1768 l10n_util::GetStringUTF16(
1769 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); 1769 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS));
1770 } 1770 }
1771 } else { 1771 } else {
1772 PersonalDataManager* manager = GetManager(); 1772 PersonalDataManager* manager = GetManager();
1773 const std::vector<CreditCard*>& cards = manager->credit_cards(); 1773 const std::vector<CreditCard*>& cards = manager->GetCreditCards();
1774 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 1774 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
1775 for (size_t i = 0; i < cards.size(); ++i) { 1775 for (size_t i = 0; i < cards.size(); ++i) {
1776 suggested_cc_.AddKeyedItemWithIcon( 1776 suggested_cc_.AddKeyedItemWithIcon(
1777 cards[i]->guid(), 1777 cards[i]->guid(),
1778 cards[i]->Label(), 1778 cards[i]->Label(),
1779 rb.GetImageNamed(cards[i]->IconResourceId())); 1779 rb.GetImageNamed(cards[i]->IconResourceId()));
1780 } 1780 }
1781 1781
1782 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); 1782 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles();
1783 const std::string app_locale = g_browser_process->GetApplicationLocale(); 1783 const std::string app_locale = g_browser_process->GetApplicationLocale();
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 url, 2395 url,
2396 content::PAGE_TRANSITION_AUTO_BOOKMARK); 2396 content::PAGE_TRANSITION_AUTO_BOOKMARK);
2397 params.disposition = NEW_FOREGROUND_TAB; 2397 params.disposition = NEW_FOREGROUND_TAB;
2398 chrome::Navigate(&params); 2398 chrome::Navigate(&params);
2399 #else 2399 #else
2400 // TODO(estade): use TabModelList? 2400 // TODO(estade): use TabModelList?
2401 #endif 2401 #endif
2402 } 2402 }
2403 2403
2404 } // namespace autofill 2404 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698