[omnibox]: Client side document scoring.
Currently, the server provides scores with document suggestions.
Optionally, local scores can be used. Local scoring is limited; i.e. the
1st doc suggest is scored n_1, the 2nd is scored n_2, and the 3rd is
scored n_3, where n_1, n_2, and n_3 are finch-configurable constants.
With this CL, local scoring considers user input and suggestion text
similarity. Additionally, finch parameters determine which score to use,
or weather to use the lower of the two score, as well as other scoring
parameters. Optionally, scores can be capped as before based on ranking.
Lastly, scores for documents owned by the browser profile can be
promoted, and scores for docs not owned can be demoted.
Default behavior is unchanged; the server scores will be used.
Bug: 982382
Change-Id: I61bb5df87c538b54ca69e10efaf1cee584942469
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692973
Commit-Queue: manuk hovanesian <[email protected]>
Reviewed-by: Justin Donnelly <[email protected]>
Cr-Commit-Position: refs/heads/master@{#679221}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 39eac7a..1672b7b 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -730,6 +730,46 @@
heap_profiling::kMemlogSamplingRate5MB},
};
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
+const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = {
+ {"DocumentUseServerScore", "true"},
+ {"DocumentUseClientScore", "false"},
+ {"DocumentCapScorePerRank", "false"},
+ {"DocumentBoostOwned", "false"},
+};
+const FeatureEntry::FeatureParam
+ kOmniboxDocumentProviderServerScoringCappedByRank[] = {
+ {"DocumentUseServerScore", "true"},
+ {"DocumentUseClientScore", "false"},
+ {"DocumentCapScorePerRank", "true"},
+ {"DocumentBoostOwned", "true"},
+};
+const FeatureEntry::FeatureParam kOmniboxDocumentProviderClientScoring[] = {
+ {"DocumentUseServerScore", "false"},
+ {"DocumentUseClientScore", "true"},
+ {"DocumentCapScorePerRank", "false"},
+ {"DocumentBoostOwned", "false"},
+};
+const FeatureEntry::FeatureParam
+ kOmniboxDocumentProviderServerAndClientScoring[] = {
+ {"DocumentUseServerScore", "true"},
+ {"DocumentUseClientScore", "true"},
+ {"DocumentCapScorePerRank", "false"},
+ {"DocumentBoostOwned", "false"},
+};
+
+const FeatureEntry::FeatureVariation kOmniboxDocumentProviderVariations[] = {
+ {"server scores", kOmniboxDocumentProviderServerScoring,
+ base::size(kOmniboxDocumentProviderServerScoring), nullptr},
+ {"server scores capped by rank",
+ kOmniboxDocumentProviderServerScoringCappedByRank,
+ base::size(kOmniboxDocumentProviderServerScoringCappedByRank), nullptr},
+ {"client scores", kOmniboxDocumentProviderClientScoring,
+ base::size(kOmniboxDocumentProviderClientScoring), nullptr},
+ {"server and client scores", kOmniboxDocumentProviderServerAndClientScoring,
+ base::size(kOmniboxDocumentProviderServerAndClientScoring), nullptr}};
+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
+
const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
{OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
@@ -2580,7 +2620,9 @@
{"omnibox-drive-suggestions",
flag_descriptions::kOmniboxDriveSuggestionsName,
flag_descriptions::kOmniboxDriveSuggestionsDescriptions, kOsDesktop,
- FEATURE_VALUE_TYPE(omnibox::kDocumentProvider)},
+ FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kDocumentProvider,
+ kOmniboxDocumentProviderVariations,
+ "OmniboxBundledExperimentV1")},
{"omnibox-deduplicate-drive-urls",
flag_descriptions::kOmniboxDeduplicateDriveUrlsName,
flag_descriptions::kOmniboxDeduplicateDriveUrlsDescription, kOsDesktop,