Index: chrome/browser/autofill/autofill_manager.h |
=================================================================== |
--- chrome/browser/autofill/autofill_manager.h (revision 71419) |
+++ chrome/browser/autofill/autofill_manager.h (working copy) |
@@ -67,15 +67,22 @@ |
// Returns the value of the AutoFillEnabled pref. |
virtual bool IsAutoFillEnabled() const; |
- // Handles the form data submitted by the user. |
- void HandleSubmit(); |
+ // Handles the form data submitted by the user. |data_present| indicates |
+ // bitfield of the fields that we autofilled. |
+ void HandleSubmit(std::string const& data_present); |
dhollowa
2011/01/14 18:40:58
I'd like to see a bit of refactoring here. This i
GeorgeY
2011/01/18 21:04:56
Done.
dhollowa
2011/01/18 21:48:09
Almost. #4 didn't get done.
Here's a patch of wha
|
// Uploads the form data to the AutoFill server. |
- void UploadFormData(); |
+ void UploadFormData(std::string const& data_present); |
// Reset cache. |
void Reset(); |
+ // Set |field_type| presence bit in the |bitfield|. |
+ void SetPresenceBit(AutoFillFieldType field_type, |
+ std::vector<uint8>* bitfield); |
+ // Converts |bitfield| to string for uploading. |
+ std::string ConvertPresenceBitsToString(std::vector<uint8> const& bitfield); |
+ |
protected: |
// For tests. |
AutoFillManager(); |
@@ -173,8 +180,9 @@ |
void ParseForms(const std::vector<webkit_glue::FormData>& forms); |
// Uses existing personal data to determine possible field types for the |
- // |upload_form_structure_|. |
- void DeterminePossibleFieldTypesForUpload( |
+ // |upload_form_structure_|. Returns string representation of the bitfield of |
+ // all of the fields types that we will send information for the form. |
+ std::string DeterminePossibleFieldTypesForUpload( |
const FormStructure* cached_upload_form_structure); |
// The TabContents hosting this AutoFillManager. |
@@ -211,6 +219,9 @@ |
// Deletes itself when closed. |
AutoFillCCInfoBarDelegate* cc_infobar_; |
+ // Bitfield that indicates which fields were autofilled for last Credit Card. |
+ std::string data_autofilled_; |
+ |
// GUID to ID mapping. We keep two maps to convert back and forth. |
std::map<std::string, int> guid_id_map_; |
std::map<int, std::string> id_guid_map_; |