Disable-smart-selection-by-default.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: csagan5 <32685696+csagan5@users.noreply.github.com>
  2. Date: Fri, 24 Jan 2020 19:17:22 +0100
  3. Subject: Disable smart selection by default
  4. Allow web search in incognito mode (reverts
  5. commit 48d4ae54f7565c429bf29cd63806aee5d7e93e69)
  6. Notice that re-enabling smart selection would make incognito mode potentially
  7. leak information through the TextClassifier set by OEM, if any
  8. ---
  9. chrome/browser/flags/android/chrome_feature_list.cc | 2 +-
  10. .../content/browser/selection/SelectionPopupControllerImpl.java | 2 +-
  11. 2 files changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
  13. --- a/chrome/browser/flags/android/chrome_feature_list.cc
  14. +++ b/chrome/browser/flags/android/chrome_feature_list.cc
  15. @@ -479,7 +479,7 @@ const base::Feature kDownloadProgressInfoBar{"DownloadProgressInfoBar",
  16. base::FEATURE_ENABLED_BY_DEFAULT};
  17. const base::Feature kDownloadFileProvider{"DownloadFileProvider",
  18. - base::FEATURE_ENABLED_BY_DEFAULT};
  19. + base::FEATURE_DISABLED_BY_DEFAULT};
  20. const base::Feature kDownloadNotificationBadge{
  21. "DownloadNotificationBadge", base::FEATURE_ENABLED_BY_DEFAULT};
  22. diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
  23. --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
  24. +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
  25. @@ -831,7 +831,7 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper
  26. menu.removeItem(R.id.select_action_menu_share);
  27. }
  28. - if (isFocusedNodeEditable() || isIncognito()
  29. + if (isFocusedNodeEditable()
  30. || !isSelectActionModeAllowed(MENU_ITEM_WEB_SEARCH)) {
  31. menu.removeItem(R.id.select_action_menu_web_search);
  32. }
  33. --
  34. 2.17.1