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

Unified Diff: components/autofill/core/browser/autofill_manager.h

Issue 1821053002: [Autofill] Disambiguate similar types before uploading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 9 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_manager.h
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h
index b14aad2bb477d24cba6efd7b38e1ced7289d11ce..a859e2ff36f4c268f80e7e7c18ac3a175517de37 100644
--- a/components/autofill/core/browser/autofill_manager.h
+++ b/components/autofill/core/browser/autofill_manager.h
@@ -416,6 +416,24 @@ class AutofillManager : public AutofillDownloadManager::Observer,
const std::string& app_locale,
FormStructure* submitted_form);
+ // Uses context about previous and next fields to select the appropriate type
+ // for fields with ambiguous upload types.
+ static void DisambiguateUploadTypes(FormStructure* form);
+
+ // Disambiguates address field upload types.
+ static void DisambiguateAddressUploadTypes(FormStructure* form,
+ size_t current_index);
+
+ // Disambiguates phone field upload types.
+ static void DisambiguatePhoneUploadTypes(FormStructure* form,
+ size_t current_index);
+
+ // Disambiguates name field upload types.
+ static void DisambiguateNameUploadTypes(
+ FormStructure* form,
+ size_t current_index,
+ const ServerFieldTypeSet& upload_types);
+
#ifdef ENABLE_FORM_DEBUG_DUMP
// Dumps the cached forms to a file on disk.
void DumpAutofillData(bool imported_cc) const;
@@ -517,6 +535,7 @@ class AutofillManager : public AutofillDownloadManager::Observer,
DeterminePossibleFieldTypesForUpload);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
DeterminePossibleFieldTypesForUploadStressTest);
+ FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DisambiguateUploadTypes);
FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
DisabledAutofillDispatchesError);
FRIEND_TEST_ALL_PREFIXES(AutofillMetricsTest, AddressFilledFormEvents);
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698