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