| OLD | NEW |
| 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 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 suggested_cc_billing_.AddKeyedItem( | 1751 suggested_cc_billing_.AddKeyedItem( |
| 1752 kAddNewItemKey, | 1752 kAddNewItemKey, |
| 1753 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS)); | 1753 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADD_BILLING_DETAILS)); |
| 1754 suggested_cc_billing_.AddKeyedItem( | 1754 suggested_cc_billing_.AddKeyedItem( |
| 1755 kManageItemsKey, | 1755 kManageItemsKey, |
| 1756 l10n_util::GetStringUTF16( | 1756 l10n_util::GetStringUTF16( |
| 1757 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); | 1757 IDS_AUTOFILL_DIALOG_MANAGE_BILLING_DETAILS)); |
| 1758 } | 1758 } |
| 1759 } else { | 1759 } else { |
| 1760 PersonalDataManager* manager = GetManager(); | 1760 PersonalDataManager* manager = GetManager(); |
| 1761 const std::vector<CreditCard*>& cards = manager->credit_cards(); | 1761 const std::vector<CreditCard*>& cards = manager->GetCreditCards(); |
| 1762 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 1762 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 1763 for (size_t i = 0; i < cards.size(); ++i) { | 1763 for (size_t i = 0; i < cards.size(); ++i) { |
| 1764 suggested_cc_.AddKeyedItemWithIcon( | 1764 suggested_cc_.AddKeyedItemWithIcon( |
| 1765 cards[i]->guid(), | 1765 cards[i]->guid(), |
| 1766 cards[i]->Label(), | 1766 cards[i]->Label(), |
| 1767 rb.GetImageNamed(cards[i]->IconResourceId())); | 1767 rb.GetImageNamed(cards[i]->IconResourceId())); |
| 1768 } | 1768 } |
| 1769 | 1769 |
| 1770 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); | 1770 const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); |
| 1771 const std::string app_locale = g_browser_process->GetApplicationLocale(); | 1771 const std::string app_locale = g_browser_process->GetApplicationLocale(); |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 url, | 2371 url, |
| 2372 content::PAGE_TRANSITION_AUTO_BOOKMARK); | 2372 content::PAGE_TRANSITION_AUTO_BOOKMARK); |
| 2373 params.disposition = NEW_FOREGROUND_TAB; | 2373 params.disposition = NEW_FOREGROUND_TAB; |
| 2374 chrome::Navigate(¶ms); | 2374 chrome::Navigate(¶ms); |
| 2375 #else | 2375 #else |
| 2376 // TODO(estade): use TabModelList? | 2376 // TODO(estade): use TabModelList? |
| 2377 #endif | 2377 #endif |
| 2378 } | 2378 } |
| 2379 | 2379 |
| 2380 } // namespace autofill | 2380 } // namespace autofill |
| OLD | NEW |