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

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

Issue 541001: Add two AutoFill prefs. autofill.infobar_shown is true if the autofill infob... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_infobar_delegate.cc
===================================================================
--- chrome/browser/autofill/autofill_infobar_delegate.cc (revision 35750)
+++ chrome/browser/autofill/autofill_infobar_delegate.cc (working copy)
@@ -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 @@
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 @@
bool AutoFillInfoBarDelegate::Accept() {
if (host_) {
- host_->SaveFormData();
+ host_->OnInfoBarAccepted();
host_ = NULL;
}
return true;
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698