diff options
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r-- | chrome/browser/autofill/autofill_dialog_gtk.cc | 7 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_dialog_mac.mm | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc index afbd0c4..6abae96 100644 --- a/chrome/browser/autofill/autofill_dialog_gtk.cc +++ b/chrome/browser/autofill/autofill_dialog_gtk.cc @@ -18,7 +18,9 @@ #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/gtk/options/options_layout_gtk.h" +#include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" +#include "chrome/common/pref_names.h" #include "gfx/gtk_util.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -897,6 +899,11 @@ void AutoFillDialog::AddCreditCard(const CreditCard& credit_card) { void ShowAutoFillDialog(gfx::NativeWindow parent, AutoFillDialogObserver* observer, Profile *profile) { + // It's possible we haven't shown the InfoBar yet, but if the user is in the + // AutoFill dialog, she doesn't need to be asked to enable or disable + // AutoFill. + profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); + if (!dialog) { dialog = new AutoFillDialog(observer, profile->GetPersonalDataManager()->profiles(), diff --git a/chrome/browser/autofill/autofill_dialog_mac.mm b/chrome/browser/autofill/autofill_dialog_mac.mm index d23236b..c011822 100644 --- a/chrome/browser/autofill/autofill_dialog_mac.mm +++ b/chrome/browser/autofill/autofill_dialog_mac.mm @@ -4,7 +4,9 @@ #import "chrome/browser/autofill/autofill_dialog_controller_mac.h" #include "chrome/browser/autofill/autofill_dialog.h" +#include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" +#include "chrome/common/pref_names.h" // Mac implementation of |ShowAutoFillDialog| interface defined in // |chrome/browser/autofill/autofill_dialog.h|. @@ -12,6 +14,11 @@ void ShowAutoFillDialog(AutoFillDialogObserver* observer, const std::vector<AutoFillProfile*>& profiles, const std::vector<CreditCard*>& credit_cards, Profile *profile) { + // It's possible we haven't shown the InfoBar yet, but if the user is in the + // AutoFill dialog, she doesn't need to be asked to enable or disable + // AutoFill. + profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); + [AutoFillDialogController showAutoFillDialogWithObserver:observer autoFillProfiles:profiles |