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

Side by Side Diff: chrome/browser/views/autofill_profiles_view_win.cc

Issue 3265005: fix for [AutoFill credit cards] Editing last 4 digit card number is not save... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 3 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
« no previous file with comments | « chrome/browser/views/autofill_profiles_view_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
5 #include "chrome/browser/views/autofill_profiles_view_win.h" 5 #include "chrome/browser/views/autofill_profiles_view_win.h"
6 6
7 #include <vsstyle.h> 7 #include <vsstyle.h>
8 #include <vssym32.h> 8 #include <vssym32.h>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 ///////////////////////////////////////////////////////////////////////////// 647 /////////////////////////////////////////////////////////////////////////////
648 // AutoFillProfilesView::EditableSetViewContents, public: 648 // AutoFillProfilesView::EditableSetViewContents, public:
649 AutoFillProfilesView::EditableSetViewContents::EditableSetViewContents( 649 AutoFillProfilesView::EditableSetViewContents::EditableSetViewContents(
650 AutoFillProfilesView* observer, 650 AutoFillProfilesView* observer,
651 AddressComboBoxModel* billing_model, 651 AddressComboBoxModel* billing_model,
652 bool new_item, 652 bool new_item,
653 std::vector<EditableSetInfo>::iterator field_set) 653 std::vector<EditableSetInfo>::iterator field_set)
654 : editable_fields_set_(field_set), 654 : editable_fields_set_(field_set),
655 temporary_info_(*editable_fields_set_), 655 temporary_info_(*editable_fields_set_),
656 has_credit_card_number_been_edited_(false),
656 observer_(observer), 657 observer_(observer),
657 billing_model_(billing_model), 658 billing_model_(billing_model),
658 combo_box_billing_(NULL), 659 combo_box_billing_(NULL),
659 new_item_(new_item) { 660 new_item_(new_item) {
660 ZeroMemory(text_fields_, sizeof(text_fields_)); 661 ZeroMemory(text_fields_, sizeof(text_fields_));
661 } 662 }
662 663
663 ///////////////////////////////////////////////////////////////////////////// 664 /////////////////////////////////////////////////////////////////////////////
664 // AutoFillProfilesView::EditableSetViewContents, protected: 665 // AutoFillProfilesView::EditableSetViewContents, protected:
665 ///////////////////////////////////////////////////////////////////////////// 666 /////////////////////////////////////////////////////////////////////////////
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 UpdateButtons(); 858 UpdateButtons();
858 return; 859 return;
859 } 860 }
860 } 861 }
861 } 862 }
862 } 863 }
863 864
864 bool AutoFillProfilesView::EditableSetViewContents::HandleKeystroke( 865 bool AutoFillProfilesView::EditableSetViewContents::HandleKeystroke(
865 views::Textfield* sender, const views::Textfield::Keystroke& keystroke) { 866 views::Textfield* sender, const views::Textfield::Keystroke& keystroke) {
866 if (sender == text_fields_[TEXT_CC_NUMBER] && 867 if (sender == text_fields_[TEXT_CC_NUMBER] &&
867 !temporary_info_.has_credit_card_number_been_edited) { 868 !has_credit_card_number_been_edited_) {
868 // You cannot edit obfuscated number, you must retype it anew. 869 // You cannot edit obfuscated number, you must retype it anew.
869 sender->SetText(string16()); 870 sender->SetText(string16());
870 temporary_info_.has_credit_card_number_been_edited = true; 871 has_credit_card_number_been_edited_ = true;
871 } 872 }
872 return false; 873 return false;
873 } 874 }
874 875
875 ///////////////////////////////////////////////////////////////////////////// 876 /////////////////////////////////////////////////////////////////////////////
876 // AutoFillProfilesView::EditableSetViewContents, 877 // AutoFillProfilesView::EditableSetViewContents,
877 // views::Combobox::Listener implementations: 878 // views::Combobox::Listener implementations:
878 void AutoFillProfilesView::EditableSetViewContents::ItemChanged( 879 void AutoFillProfilesView::EditableSetViewContents::ItemChanged(
879 views::Combobox* combo_box, int prev_index, int new_index) { 880 views::Combobox* combo_box, int prev_index, int new_index) {
880 DCHECK(billing_model_); 881 DCHECK(billing_model_);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 AutoFillDialogObserver* observer, 1397 AutoFillDialogObserver* observer,
1397 Profile* profile) { 1398 Profile* profile) {
1398 DCHECK(profile); 1399 DCHECK(profile);
1399 1400
1400 PersonalDataManager* personal_data_manager = 1401 PersonalDataManager* personal_data_manager =
1401 profile->GetPersonalDataManager(); 1402 profile->GetPersonalDataManager();
1402 DCHECK(personal_data_manager); 1403 DCHECK(personal_data_manager);
1403 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, 1404 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile,
1404 profile->GetPrefs(), NULL, NULL); 1405 profile->GetPrefs(), NULL, NULL);
1405 } 1406 }
OLDNEW
« no previous file with comments | « chrome/browser/views/autofill_profiles_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698