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

Unified Diff: chrome/browser/autofill/autofill_dialog_gtk.cc

Issue 3140024: Implement policy for disabling auto fill. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: regenerate XIBs in order to avoid maxID corruption. Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_dialog_gtk.cc
diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc
index cc383d86eb1415c4d356bf99eef68269d969510e..624f36b413289d5a89f1cf923c28147378ae8894 100644
--- a/chrome/browser/autofill/autofill_dialog_gtk.cc
+++ b/chrome/browser/autofill/autofill_dialog_gtk.cc
@@ -273,7 +273,7 @@ void AutoFillDialog::OnAutoFillCheckToggled(GtkWidget* widget) {
UserMetrics::RecordAction(UserMetricsAction("Options_FormAutofill_Disable"),
profile_);
}
- enable_form_autofill_.SetValue(enabled);
+ enable_form_autofill_.SetValueIfNotManaged(enabled);
profile_->GetPrefs()->ScheduleSavePersistentPrefs();
UpdateWidgetState();
}
@@ -546,6 +546,8 @@ void AutoFillDialog::InitializeWidgets() {
}
void AutoFillDialog::UpdateWidgetState() {
+ gtk_widget_set_sensitive(form_autofill_enable_check_,
+ !enable_form_autofill_.IsManaged());
if (!personal_data_->IsDataLoaded() || !enable_form_autofill_.GetValue()) {
gtk_widget_set_sensitive(add_address_button_, FALSE);
gtk_widget_set_sensitive(add_credit_card_button_, FALSE);

Powered by Google App Engine
This is Rietveld 408576698