summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_infobar_delegate.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 18:49:40 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 18:49:40 +0000
commit551c0ffd523786298b5313a50564494afd056745 (patch)
tree916024ccb7f0edeff9455b6b2d4f1521bf73f8a5 /chrome/browser/autofill/autofill_infobar_delegate.cc
parent4e18aae06487749184fdd752f1dc457cc15e4a96 (diff)
downloadchromium_src-551c0ffd523786298b5313a50564494afd056745.zip
chromium_src-551c0ffd523786298b5313a50564494afd056745.tar.gz
chromium_src-551c0ffd523786298b5313a50564494afd056745.tar.bz2
Add two AutoFill prefs. autofill.infobar_shown is true if the autofill infobar has been shown to the user. autofill.enabled is true if the user has accepted the autofill confirmation infobar.
BUG=none TEST=none Review URL: http://codereview.chromium.org/541001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_infobar_delegate.cc')
-rw-r--r--chrome/browser/autofill/autofill_infobar_delegate.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/autofill/autofill_infobar_delegate.cc b/chrome/browser/autofill/autofill_infobar_delegate.cc
index 9333b3a..0263cca 100644
--- a/chrome/browser/autofill/autofill_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_infobar_delegate.cc
@@ -7,7 +7,10 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "chrome/browser/autofill/autofill_manager.h"
+#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -17,8 +20,11 @@ AutoFillInfoBarDelegate::AutoFillInfoBarDelegate(TabContents* tab_contents,
AutoFillManager* host)
: ConfirmInfoBarDelegate(tab_contents),
host_(host) {
- if (tab_contents)
+ if (tab_contents) {
+ PrefService* prefs = tab_contents->profile()->GetPrefs();
+ prefs->SetBoolean(prefs::kAutoFillInfoBarShown, true);
tab_contents->AddInfoBar(this);
+ }
}
AutoFillInfoBarDelegate::~AutoFillInfoBarDelegate() {
@@ -61,7 +67,7 @@ std::wstring AutoFillInfoBarDelegate::GetButtonLabel(
bool AutoFillInfoBarDelegate::Accept() {
if (host_) {
- host_->SaveFormData();
+ host_->OnInfoBarAccepted();
host_ = NULL;
}
return true;