Przeglądaj źródła

add omnibox autocompletion disabling option

Noah Vogt 3 lat temu
rodzic
commit
15f34ec47b
2 zmienionych plików z 29 dodań i 1 usunięć
  1. 29 0
      no-omnibox-suggestion-autocomplete.patch
  2. 0 1
      xdg-basedir.patch

+ 29 - 0
no-omnibox-suggestion-autocomplete.patch

@@ -0,0 +1,29 @@
+# Add options '1' and '2' in the flag #omnibox-ui-max-autocomplete-matches.
+# Setting '1' effectively disables autocompletion in the url bar (called
+# 'omnibox' in chromium internally). This is way easier than diabling all
+# history internally, but still allowing to get rid of shoulder surfing.
+
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -1254,6 +1254,10 @@
+     {"15", kMaxZeroSuggestMatches15, base::size(kMaxZeroSuggestMatches15),
+      nullptr}};
+ 
++const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches1[] = {
++    {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "1"}};
++const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches2[] = {
++    {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "2"}};
+ const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches3[] = {
+     {OmniboxFieldTrial::kUIMaxAutocompleteMatchesParam, "3"}};
+ const FeatureEntry::FeatureParam kOmniboxUIMaxAutocompleteMatches4[] = {
+@@ -1275,6 +1279,10 @@
+ 
+ const FeatureEntry::FeatureVariation
+     kOmniboxUIMaxAutocompleteMatchesVariations[] = {
++        {"1 matches", kOmniboxUIMaxAutocompleteMatches1,
++         base::size(kOmniboxUIMaxAutocompleteMatches1), nullptr},
++        {"2 matches", kOmniboxUIMaxAutocompleteMatches2,
++         base::size(kOmniboxUIMaxAutocompleteMatches2), nullptr},
+         {"3 matches", kOmniboxUIMaxAutocompleteMatches3,
+          base::size(kOmniboxUIMaxAutocompleteMatches3), nullptr},
+         {"4 matches", kOmniboxUIMaxAutocompleteMatches4,

+ 0 - 1
xdg-basedir.patch

@@ -83,4 +83,3 @@
    // codebase to address this.
    SECMODModule* module = SECMOD_LoadUserModule(
        const_cast<char*>(modparams.c_str()), nullptr, PR_FALSE);
-