123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- From: csagan5 <32685696+csagan5@users.noreply.github.com>
- Date: Wed, 17 Oct 2018 06:06:11 +0200
- Subject: Permanently disable query-in-omnibox
- ---
- .../chromium/chrome/browser/ChromeFeatureList.java | 1 -
- .../chrome/browser/toolbar/ToolbarModel.java | 2 +-
- chrome/browser/about_flags.cc | 4 ----
- chrome/browser/android/chrome_feature_list.cc | 1 -
- chrome/browser/flag_descriptions.cc | 5 ----
- chrome/browser/flag_descriptions.h | 3 ---
- components/omnibox/browser/query_in_omnibox.cc | 27 +---------------------
- 7 files changed, 2 insertions(+), 41 deletions(-)
- diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
- --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
- +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
- @@ -272,7 +272,6 @@ public abstract class ChromeFeatureList {
- public static final String SOUND_CONTENT_SETTING = "SoundContentSetting";
- public static final String SPANNABLE_INLINE_AUTOCOMPLETE = "SpannableInlineAutocomplete";
- public static final String SUBRESOURCE_FILTER = "SubresourceFilter";
- - public static final String QUERY_IN_OMNIBOX = "QueryInOmnibox";
- public static final String TAB_REPARENTING = "TabReparenting";
- public static final String TRUSTED_WEB_ACTIVITY = "TrustedWebActivity";
- public static final String TRUSTED_WEB_ACTIVITY_POST_MESSAGE = "TrustedWebActivityPostMessage";
- diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
- --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
- +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
- @@ -85,7 +85,7 @@ public class ToolbarModel implements ToolbarDataProvider {
- */
- public void initializeWithNative() {
- mNativeToolbarModelAndroid = nativeInit();
- - mQueryInOmniboxEnabled = ChromeFeatureList.isEnabled(ChromeFeatureList.QUERY_IN_OMNIBOX);
- + mQueryInOmniboxEnabled = false;
- }
-
- /**
- diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
- --- a/chrome/browser/about_flags.cc
- +++ b/chrome/browser/about_flags.cc
- @@ -3977,10 +3977,6 @@ const FeatureEntry kFeatureEntries[] = {
- FEATURE_VALUE_TYPE(features::kOobeRecommendAppsScreen)},
- #endif // OS_CHROMEOS
-
- - {"enable-query-in-omnibox", flag_descriptions::kQueryInOmniboxName,
- - flag_descriptions::kQueryInOmniboxDescription, kOsAll,
- - FEATURE_VALUE_TYPE(omnibox::kQueryInOmnibox)},
- -
- {"enable-viz-hit-test-draw-quad",
- flag_descriptions::kVizHitTestDrawQuadName,
- flag_descriptions::kVizHitTestDrawQuadDescription, kOsAll,
- diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
- --- a/chrome/browser/android/chrome_feature_list.cc
- +++ b/chrome/browser/android/chrome_feature_list.cc
- @@ -167,7 +167,6 @@ const base::Feature* kFeaturesExposedToJava[] = {
- &offline_pages::kOfflinePagesSharingFeature,
- &offline_pages::kOfflinePagesLivePageSharingFeature,
- &offline_pages::kPrefetchingOfflinePagesFeature,
- - &omnibox::kQueryInOmnibox,
- &omnibox::kUIExperimentHideSteadyStateUrlSchemeAndSubdomains,
- &password_manager::features::kPasswordExport,
- &password_manager::features::kPasswordSearchMobile,
- diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
- --- a/chrome/browser/flag_descriptions.cc
- +++ b/chrome/browser/flag_descriptions.cc
- @@ -1522,11 +1522,6 @@ const char kPullToRefreshDescription[] =
- "Pull-to-refresh gesture in response to vertical overscroll.";
- const char kPullToRefreshEnabledTouchscreen[] = "Enabled for touchscreen only";
-
- -const char kQueryInOmniboxName[] = "Query in Omnibox";
- -const char kQueryInOmniboxDescription[] =
- - "Only display query terms in the omnibox when viewing a search results "
- - "page.";
- -
- const char kQuicName[] = "Experimental QUIC protocol";
- const char kQuicDescription[] = "Enable experimental QUIC protocol support.";
-
- diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
- --- a/chrome/browser/flag_descriptions.h
- +++ b/chrome/browser/flag_descriptions.h
- @@ -934,9 +934,6 @@ extern const char kPullToRefreshName[];
- extern const char kPullToRefreshDescription[];
- extern const char kPullToRefreshEnabledTouchscreen[];
-
- -extern const char kQueryInOmniboxName[];
- -extern const char kQueryInOmniboxDescription[];
- -
- extern const char kQuicName[];
- extern const char kQuicDescription[];
-
- diff --git a/components/omnibox/browser/query_in_omnibox.cc b/components/omnibox/browser/query_in_omnibox.cc
- --- a/components/omnibox/browser/query_in_omnibox.cc
- +++ b/components/omnibox/browser/query_in_omnibox.cc
- @@ -10,16 +10,6 @@
- #include "components/omnibox/browser/omnibox_field_trial.h"
- #include "components/search_engines/template_url_service.h"
-
- -namespace {
- -
- -bool SecurityLevelSafeForQueryInOmnibox(
- - security_state::SecurityLevel security_level) {
- - return security_level == security_state::SecurityLevel::SECURE ||
- - security_level == security_state::SecurityLevel::EV_SECURE;
- -}
- -
- -} // namespace
- -
- QueryInOmnibox::QueryInOmnibox(AutocompleteClassifier* autocomplete_classifier,
- TemplateURLService* template_url_service)
- : autocomplete_classifier_(autocomplete_classifier),
- @@ -32,22 +22,7 @@ bool QueryInOmnibox::GetDisplaySearchTerms(
- security_state::SecurityLevel security_level,
- const GURL& url,
- base::string16* search_terms) {
- - if (!base::FeatureList::IsEnabled(omnibox::kQueryInOmnibox))
- - return false;
- -
- - if (!ignore_security_level_ &&
- - !SecurityLevelSafeForQueryInOmnibox(security_level)) {
- - return false;
- - }
- -
- - base::string16 extracted_search_terms = ExtractSearchTermsInternal(url);
- - if (extracted_search_terms.empty())
- - return false;
- -
- - if (search_terms)
- - *search_terms = extracted_search_terms;
- -
- - return true;
- + return false;
- }
-
- base::string16 QueryInOmnibox::ExtractSearchTermsInternal(const GURL& url) {
- --
- 2.11.0
|