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

Unified Diff: chrome/browser/autofill/autofill_dialog_controller_mac.mm

Issue 2799054: Remove the AutoFill enable/disable radio from the Options dialog to the AutoFill dialog (Closed)
Patch Set: Created 10 years, 6 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_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)];

Powered by Google App Engine
This is Rietveld 408576698