| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/views/autofill_profiles_view_win.h" | 5 #include "chrome/browser/views/autofill_profiles_view_win.h" |
| 5 | 6 |
| 6 #include <vsstyle.h> | 7 #include <vsstyle.h> |
| 7 #include <vssym32.h> | 8 #include <vssym32.h> |
| 8 | 9 |
| 9 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 11 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 12 #include "base/string_util.h" | 13 #include "base/string_number_conversions.h" |
| 13 #include "base/time.h" | 14 #include "base/time.h" |
| 14 #include "chrome/browser/autofill/autofill_manager.h" | 15 #include "chrome/browser/autofill/autofill_manager.h" |
| 15 #include "chrome/browser/autofill/phone_number.h" | 16 #include "chrome/browser/autofill/phone_number.h" |
| 16 #include "chrome/browser/browser.h" | 17 #include "chrome/browser/browser.h" |
| 17 #include "chrome/browser/browser_list.h" | 18 #include "chrome/browser/browser_list.h" |
| 18 #include "chrome/browser/browser_window.h" | 19 #include "chrome/browser/browser_window.h" |
| 19 #include "chrome/browser/metrics/user_metrics.h" | 20 #include "chrome/browser/metrics/user_metrics.h" |
| 20 #include "chrome/browser/pref_service.h" | 21 #include "chrome/browser/pref_service.h" |
| 21 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profile.h" |
| 22 #include "chrome/browser/views/list_background.h" | 23 #include "chrome/browser/views/list_background.h" |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 // views::Combobox::Listener implementations: | 871 // views::Combobox::Listener implementations: |
| 871 void AutoFillProfilesView::EditableSetViewContents::ItemChanged( | 872 void AutoFillProfilesView::EditableSetViewContents::ItemChanged( |
| 872 views::Combobox* combo_box, int prev_index, int new_index) { | 873 views::Combobox* combo_box, int prev_index, int new_index) { |
| 873 DCHECK(billing_model_); | 874 DCHECK(billing_model_); |
| 874 if (combo_box == combo_box_billing_) { | 875 if (combo_box == combo_box_billing_) { |
| 875 if (new_index == -1) { | 876 if (new_index == -1) { |
| 876 NOTREACHED(); | 877 NOTREACHED(); |
| 877 } else { | 878 } else { |
| 878 DCHECK(new_index < static_cast<int>(observer_->profiles_set_.size())); | 879 DCHECK(new_index < static_cast<int>(observer_->profiles_set_.size())); |
| 879 temporary_info_.credit_card.set_billing_address( | 880 temporary_info_.credit_card.set_billing_address( |
| 880 IntToString16( | 881 base::IntToString16( |
| 881 observer_->profiles_set_[new_index].address.unique_id())); | 882 observer_->profiles_set_[new_index].address.unique_id())); |
| 882 } | 883 } |
| 883 } else if (combo_box == combo_box_month_) { | 884 } else if (combo_box == combo_box_month_) { |
| 884 if (new_index == -1) { | 885 if (new_index == -1) { |
| 885 NOTREACHED(); | 886 NOTREACHED(); |
| 886 } else { | 887 } else { |
| 887 temporary_info_.credit_card.SetInfo( | 888 temporary_info_.credit_card.SetInfo( |
| 888 AutoFillType(CREDIT_CARD_EXP_MONTH), | 889 AutoFillType(CREDIT_CARD_EXP_MONTH), |
| 889 combo_box_model_month_->GetItemAt(new_index)); | 890 combo_box_model_month_->GetItemAt(new_index)); |
| 890 } | 891 } |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 AutoFillDialogObserver* observer, | 1388 AutoFillDialogObserver* observer, |
| 1388 Profile* profile) { | 1389 Profile* profile) { |
| 1389 DCHECK(profile); | 1390 DCHECK(profile); |
| 1390 | 1391 |
| 1391 PersonalDataManager* personal_data_manager = | 1392 PersonalDataManager* personal_data_manager = |
| 1392 profile->GetPersonalDataManager(); | 1393 profile->GetPersonalDataManager(); |
| 1393 DCHECK(personal_data_manager); | 1394 DCHECK(personal_data_manager); |
| 1394 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, | 1395 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, |
| 1395 profile->GetPrefs(), NULL, NULL); | 1396 profile->GetPrefs(), NULL, NULL); |
| 1396 } | 1397 } |
| OLD | NEW |