Chromium Code Reviews| Index: chrome/browser/autofill/autofill_manager.cc |
| =================================================================== |
| --- chrome/browser/autofill/autofill_manager.cc (revision 70750) |
| +++ chrome/browser/autofill/autofill_manager.cc (working copy) |
| @@ -382,7 +382,11 @@ |
| // proceed to the next |result| field, and the next |form_structure|. |
| ++i; |
| } |
| - autofilled_forms_signatures_.push_front(form_structure->FormSignature()); |
| + AutofilledFormInfo form_info; |
| + form_info.form_signature = form_structure->FormSignature(); |
| + form_info.profile_guid = profile_guid; |
| + form_info.cc_guid = cc_guid; |
| + autofilled_forms_signatures_.push_front(form_info); |
| host->AutoFillFormDataFilled(query_id, result); |
| return true; |
| @@ -500,13 +504,17 @@ |
| bool was_autofilled = false; |
| // Check if the form among last 3 forms that were auto-filled. |
| // Clear older signatures. |
| - std::list<std::string>::iterator it; |
| + std::list<AutofilledFormInfo>::iterator it; |
| int total_form_checked = 0; |
| + std::string profile_guid, cc_guid; |
| for (it = autofilled_forms_signatures_.begin(); |
| it != autofilled_forms_signatures_.end() && total_form_checked < 3; |
| ++it, ++total_form_checked) { |
| - if (*it == upload_form_structure_->FormSignature()) |
| + if (it->form_signature == upload_form_structure_->FormSignature()) { |
| was_autofilled = true; |
| + profile_guid = it->profile_guid; |
| + cc_guid = it->cc_guid; |
| + } |
| } |
| // Remove outdated form signatures. |
| if (total_form_checked == 3 && it != autofilled_forms_signatures_.end()) { |
| @@ -514,7 +522,8 @@ |
| autofilled_forms_signatures_.end()); |
| } |
| download_manager_.StartUploadRequest(*(upload_form_structure_.get()), |
|
Ilya Sherman
2011/01/11 23:17:37
nit: For the sake of matching indentation, please
GeorgeY
2011/01/13 23:22:28
Indentation restored
|
| - was_autofilled); |
| + was_autofilled, |
| + personal_data_->PresentData(profile_guid, cc_guid).c_str()); |
| } |
| } |