Index: chrome/browser/autofill/autofill_dialog_controller_mac.mm |
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
index 72c301b6123954d8ddd67bade6a7fabf9082a81b..941eab98b066123a29a3ff80fab2f15d37cebfa5 100644 |
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
@@ -169,6 +169,7 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() { |
@implementation AutoFillDialogController |
+@synthesize autoFillEnabled = autoFillEnabled_; |
@synthesize auxiliaryEnabled = auxiliaryEnabled_; |
@synthesize itemIsSelected = itemIsSelected_; |
@@ -226,6 +227,7 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() { |
- (IBAction)save:(id)sender { |
// If we have an |observer_| then communicate the changes back. |
if (observer_) { |
+ profile_->GetPrefs()->SetBoolean(prefs::kAutoFillEnabled, autoFillEnabled_); |
profile_->GetPrefs()->SetBoolean(prefs::kAutoFillAuxiliaryProfilesEnabled, |
auxiliaryEnabled_); |
observer_->OnAutoFillDialogApply(&profiles_, &creditCards_); |
@@ -594,6 +596,10 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() { |
importedCreditCard_ = importedCreditCard; |
// Use property here to trigger KVO binding. |
+ [self setAutoFillEnabled:profile_->GetPrefs()->GetBoolean( |
+ prefs::kAutoFillEnabled)]; |
+ |
+ // Use property here to trigger KVO binding. |
[self setAuxiliaryEnabled:profile_->GetPrefs()->GetBoolean( |
prefs::kAutoFillAuxiliaryProfilesEnabled)]; |