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

Unified Diff: components/autofill/core/browser/form_structure.cc

Issue 2073143002: [Password Generation] Run the form classifier only if AutofillMetadata is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pg_classifier_votes
Patch Set: Removed unnecessary ';' Created 4 years, 6 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: components/autofill/core/browser/form_structure.cc
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
index 485da9cf2ed4968c253fe5d7a7daa6e6768f058f..b62f9747c86340ce8cd73ca9702d0d3d88c80446 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -60,13 +60,6 @@ const int kMinCommonNamePrefixLength = 16;
// Maximum number of characters in the field label to be encoded in a proto.
const int kMaxFieldLabelNumChars = 200;
-// Returns whether sending autofill field metadata to the server is enabled.
-bool IsAutofillFieldMetadataEnabled() {
- const std::string group_name =
- base::FieldTrialList::FindFullName("AutofillFieldMetadata");
- return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
// Helper for |EncodeUploadRequest()| that creates a bit field corresponding to
// |available_field_types| and returns the hex representation as a string.
std::string EncodeFieldTypes(const ServerFieldTypeSet& available_field_types) {
@@ -572,6 +565,13 @@ std::vector<FormDataPredictions> FormStructure::GetFieldTypePredictions(
return forms;
}
+// static
+bool FormStructure::IsAutofillFieldMetadataEnabled() {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("AutofillFieldMetadata");
+ return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
+}
+
std::string FormStructure::FormSignature() const {
return base::Uint64ToString(FormSignature64Bit());
}

Powered by Google App Engine
This is Rietveld 408576698