| 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 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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(¶ms); | 2376 chrome::Navigate(¶ms); |
| 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 |
| OLD | NEW |