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

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

Issue 6213002: Propagate correct data to the Toolbar servers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: chrome/browser/autofill/autofill_manager.cc
===================================================================
--- chrome/browser/autofill/autofill_manager.cc (revision 71100)
+++ chrome/browser/autofill/autofill_manager.cc (working copy)
@@ -409,7 +409,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->Send(new ViewMsg_AutoFillFormDataFilled(
host->routing_id(), query_id, result));
@@ -544,13 +548,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()) {
@@ -558,7 +566,8 @@
autofilled_forms_signatures_.end());
}
download_manager_.StartUploadRequest(*(upload_form_structure_.get()),
- was_autofilled);
+ was_autofilled,
+ personal_data_->PresentData(profile_guid, cc_guid).c_str());
}
}

Powered by Google App Engine
This is Rietveld 408576698