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

Side by Side Diff: chrome/browser/gtk/options/content_page_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/gtk/options/content_page_gtk.h" 5 #include "chrome/browser/gtk/options/content_page_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/gtk_util.h" 9 #include "app/gtk_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool is_classic_theme = !is_gtk_theme && provider->GetThemeID().empty(); 208 bool is_classic_theme = !is_gtk_theme && provider->GetThemeID().empty();
209 gtk_widget_set_sensitive(themes_reset_button_, !is_classic_theme); 209 gtk_widget_set_sensitive(themes_reset_button_, !is_classic_theme);
210 } 210 }
211 211
212 void ContentPageGtk::OnPersonalDataLoaded() { 212 void ContentPageGtk::OnPersonalDataLoaded() {
213 DCHECK(personal_data_); 213 DCHECK(personal_data_);
214 // We might have been alerted that the PersonalDataManager has loaded, so 214 // We might have been alerted that the PersonalDataManager has loaded, so
215 // remove ourselves as observer. 215 // remove ourselves as observer.
216 personal_data_->RemoveObserver(this); 216 personal_data_->RemoveObserver(this);
217 217
218 ShowAutoFillDialog(NULL, personal_data_, profile()); 218 ShowAutoFillDialog(NULL, personal_data_, profile(), NULL, NULL);
219 } 219 }
220 220
221 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { 221 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() {
222 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 222 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
223 223
224 // Ask to save radio button. 224 // Ask to save radio button.
225 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, 225 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL,
226 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str()); 226 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str());
227 g_signal_connect(passwords_asktosave_radio_, "toggled", 227 g_signal_connect(passwords_asktosave_radio_, "toggled",
228 G_CALLBACK(OnPasswordRadioToggledThunk), this); 228 G_CALLBACK(OnPasswordRadioToggledThunk), this);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 sync_service_->ShowLoginDialog(); 618 sync_service_->ShowLoginDialog();
619 } 619 }
620 620
621 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) { 621 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) {
622 if (response == GTK_RESPONSE_ACCEPT) { 622 if (response == GTK_RESPONSE_ACCEPT) {
623 sync_service_->DisableForUser(); 623 sync_service_->DisableForUser();
624 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); 624 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
625 } 625 }
626 gtk_widget_destroy(widget); 626 gtk_widget_destroy(widget);
627 } 627 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/views/autofill_profiles_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698