summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill_manager.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 17:22:43 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 17:22:43 +0000
commitfeb7cfba67c122cd39ae15e3bac5a2be5a2014e5 (patch)
tree9d050d10fa86b8251fe42424b565c833f2443708 /chrome/browser/autofill_manager.cc
parenta01805c89445c44c954668c8441fa5d2f416fff5 (diff)
downloadchromium_src-feb7cfba67c122cd39ae15e3bac5a2be5a2014e5.zip
chromium_src-feb7cfba67c122cd39ae15e3bac5a2be5a2014e5.tar.gz
chromium_src-feb7cfba67c122cd39ae15e3bac5a2be5a2014e5.tar.bz2
This CL ensures we don't store empty values in the autofill form DB.
Also it applies a clean-up to remove any empty values previously stored in the DB. BUG=6111 TEST=Submit a form and leave some fields empty. Come back to that form, click on a field that was empty. No autofill popup should show up (or if one show up, it should not contains empty values). Review URL: http://codereview.chromium.org/21217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill_manager.cc')
-rw-r--r--chrome/browser/autofill_manager.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/autofill_manager.cc b/chrome/browser/autofill_manager.cc
index d1beb16..8284cb4 100644
--- a/chrome/browser/autofill_manager.cc
+++ b/chrome/browser/autofill_manager.cc
@@ -8,6 +8,12 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
+
+// static
+void AutofillManager::RegisterUserPrefs(PrefService* prefs) {
+ prefs->RegisterBooleanPref(prefs::kFormAutofillEnabled, true);
+}
AutofillManager::AutofillManager(WebContents* web_contents) :
web_contents_(web_contents),
@@ -108,3 +114,4 @@ void AutofillManager::StoreFormEntriesInWebDatabase(
profile()->GetWebDataService(Profile::EXPLICIT_ACCESS)->
AddAutofillFormElements(form.elements);
}
+