Set datapresent string to contain precisely those field types available in stored Autofill data.

This is what the toolbar server expects of all of its clients.

BUG=none
TEST=unit_tests --gtest_filter=PersonalDataManagerTest.GetAvailableFieldTypes:FormStructureTest.*

Review URL: http://codereview.chromium.org/6931029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84405 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autofill/autofill_download.h b/chrome/browser/autofill/autofill_download.h
index 8607474..f7b4ef9 100644
--- a/chrome/browser/autofill/autofill_download.h
+++ b/chrome/browser/autofill/autofill_download.h
@@ -15,6 +15,7 @@
 
 #include "base/memory/scoped_vector.h"
 #include "base/time.h"
+#include "chrome/browser/autofill/autofill_type.h"
 #include "chrome/common/net/url_fetcher.h"
 
 class AutofillMetrics;
@@ -71,13 +72,16 @@
   bool StartQueryRequest(const ScopedVector<FormStructure>& forms,
                          const AutofillMetrics& metric_logger);
 
-  // Start upload request if necessary. The probability of request going
-  // over the wire are GetPositiveUploadRate() if it was matched by
-  // Autofill, GetNegativeUploadRate() otherwise. Observer will be called
-  // even if there was no actual trip over the wire.
-  // |form| - form sent in this request.
-  // |form_was_matched| - true if form was matched by the Autofill.
-  bool StartUploadRequest(const FormStructure& form, bool form_was_matched);
+  // Starts an upload request for the given |form|, unless throttled by the
+  // server. The probability of the request going over the wire is
+  // GetPositiveUploadRate() if |form_was_autofilled| is true, or
+  // GetNegativeUploadRate() otherwise. The observer will be called even if
+  // there was no actual trip over the wire.
+  // |available_field_types| should contain the types for which we have data
+  // stored on the local client.
+  bool StartUploadRequest(const FormStructure& form,
+                          bool form_was_autofilled,
+                          const FieldTypeSet& available_field_types);
 
   // Cancels pending request.
   // |form_signature| - signature of the form being cancelled. Warning: