| Index: chrome/browser/autofill/autofill_download.cc
|
| diff --git a/chrome/browser/autofill/autofill_download.cc b/chrome/browser/autofill/autofill_download.cc
|
| index a8ce10e3a590cfc7b137c6fa31e89cdb062e4f0a..c481fe30e9d25d39b081b7460fde30043324fb29 100644
|
| --- a/chrome/browser/autofill/autofill_download.cc
|
| +++ b/chrome/browser/autofill/autofill_download.cc
|
| @@ -101,22 +101,27 @@ bool AutofillDownloadManager::StartQueryRequest(
|
| }
|
|
|
| bool AutofillDownloadManager::StartUploadRequest(
|
| - const FormStructure& form, bool form_was_matched) {
|
| + const FormStructure& form,
|
| + bool form_was_autofilled,
|
| + const FieldTypeSet& available_field_types) {
|
| if (next_upload_request_ > base::Time::Now()) {
|
| // We are in back-off mode: do not do the request.
|
| + VLOG(1) << "AutofillDownloadManager: Upload request is throttled.";
|
| return false;
|
| }
|
|
|
| - // Check if we need to upload form.
|
| - double upload_rate = form_was_matched ? GetPositiveUploadRate() :
|
| - GetNegativeUploadRate();
|
| + // Flip a coin to see if we should upload this form.
|
| + double upload_rate = form_was_autofilled ? GetPositiveUploadRate() :
|
| + GetNegativeUploadRate();
|
| if (base::RandDouble() > upload_rate) {
|
| - VLOG(1) << "AutofillDownloadManager: Upload request is ignored";
|
| + VLOG(1) << "AutofillDownloadManager: Upload request is ignored.";
|
| // If we ever need notification that upload was skipped, add it here.
|
| return false;
|
| }
|
| +
|
| std::string form_xml;
|
| - if (!form.EncodeUploadRequest(form_was_matched, &form_xml))
|
| + if (!form.EncodeUploadRequest(available_field_types, form_was_autofilled,
|
| + &form_xml))
|
| return false;
|
|
|
| FormRequestData request_data;
|
|
|