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

Side by Side Diff: chrome/browser/autofill/autofill_dialog_gtk.cc

Issue 1930002: AutoFill profile shouldn't be saved when cancelled during initial setup. (Closed)
Patch Set: Addressing review comments. Polishing unit test comments. Created 10 years, 7 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
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/autofill/autofill_dialog.h" 5 #include "chrome/browser/autofill/autofill_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 // TODO(jhawkins): Set the GtkComboBox widgets. 1059 // TODO(jhawkins): Set the GtkComboBox widgets.
1060 1060
1061 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget, 1061 gtk_box_pack_start(GTK_BOX(creditcards_vbox_), credit_card_widget,
1062 FALSE, FALSE, 0); 1062 FALSE, FALSE, 0);
1063 gtk_widget_show_all(credit_card_widget); 1063 gtk_widget_show_all(credit_card_widget);
1064 } 1064 }
1065 1065
1066 /////////////////////////////////////////////////////////////////////////////// 1066 ///////////////////////////////////////////////////////////////////////////////
1067 // Factory/finder method: 1067 // Factory/finder method:
1068 1068
1069 void ShowAutoFillDialog(gfx::NativeWindow parent, 1069 // TODO(jhawkins): Need to update implementation to match new interface for
1070 // |imported_profile| and |imported_credit_card| parameters.
1071 // See http://crbug.com/41010
1072 void ShowAutoFillDialog(gfx::NativeView parent,
1070 AutoFillDialogObserver* observer, 1073 AutoFillDialogObserver* observer,
1071 Profile* profile) { 1074 Profile* profile,
1075 AutoFillProfile* imported_profile,
1076 CreditCard* imported_credit_card) {
1072 // It's possible we haven't shown the InfoBar yet, but if the user is in the 1077 // It's possible we haven't shown the InfoBar yet, but if the user is in the
1073 // AutoFill dialog, she doesn't need to be asked to enable or disable 1078 // AutoFill dialog, she doesn't need to be asked to enable or disable
1074 // AutoFill. 1079 // AutoFill.
1075 profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); 1080 profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true);
1076 1081
1077 if (!dialog) { 1082 if (!dialog) {
1078 dialog = new AutoFillDialog( 1083 dialog = new AutoFillDialog(
1079 profile, 1084 profile,
1080 observer, 1085 observer,
1081 profile->GetPersonalDataManager()->profiles(), 1086 profile->GetPersonalDataManager()->profiles(),
1082 profile->GetPersonalDataManager()->credit_cards()); 1087 profile->GetPersonalDataManager()->credit_cards());
1083 } 1088 }
1084 dialog->Show(); 1089 dialog->Show();
1085 } 1090 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_dialog_controller_mac_unittest.mm ('k') | chrome/browser/autofill/autofill_dialog_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698