summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/personal_data_manager.h
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 04:01:21 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 04:01:21 +0000
commit2a958550ec25aeb2da7fa893015133f2aae32f41 (patch)
treedafc82496cf0b1f14d39183b5e9860a8ca255e70 /chrome/browser/autofill/personal_data_manager.h
parentbed98da0c1e62387a477903910781f1b54916039 (diff)
downloadchromium_src-2a958550ec25aeb2da7fa893015133f2aae32f41.zip
chromium_src-2a958550ec25aeb2da7fa893015133f2aae32f41.tar.gz
chromium_src-2a958550ec25aeb2da7fa893015133f2aae32f41.tar.bz2
Refactor Autofill parsing code. Most notably, add a helper class for parsing with lookahead.
* Adds an AutofillScanner class to help with lookahead parsing. * Remove the NULL-termination from FormStructure's fields vector * Remove some redundant DCHECKs * Refactor PersonalDataManager::ImportFormData() to take a single form, not a vector of forms. * Move EmailField class to its own file * Remove some obsolete billing/shipping address distinguishing code * Refactor the code to remove the really wonky FormFieldSet() class * Refactor some interfaces to take |size_t| rather than |int| * Remove some unused fields from FormStructure * Const-correctness BUG=none TEST=none Review URL: http://codereview.chromium.org/6910018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/personal_data_manager.h')
-rw-r--r--chrome/browser/autofill/personal_data_manager.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index 7b6299a..d98420c 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -9,6 +9,7 @@
#include <set>
#include <vector>
+#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
@@ -63,12 +64,12 @@ class PersonalDataManager
// ProfileSyncServiceObserver:
virtual void OnStateChanged();
- // TODO(isherman): Update this comment
- // If Autofill is able to determine the field types of a significant number of
- // field types that contain information in the FormStructures a profile will
- // be created with all of the information from recognized fields. Returns
- // whether a profile was created.
- bool ImportFormData(const std::vector<const FormStructure*>& form_structures,
+ // Scans the given |form| for importable Autofill data. If the form includes
+ // sufficient address data, it is immediately imported. If the form includes
+ // sufficient credit card data, it is stored into |credit_card|, so that we
+ // can prompt the user whether to save this data.
+ // Returns |true| if sufficient address or credit card data was found.
+ bool ImportFormData(const FormStructure& form,
const CreditCard** credit_card);
// Saves a credit card value detected in |ImportedFormData|.