[NextBrowser] Removing '@' search domain feature 61/322761/3
authorShubham Gupta <shubham.g5@samsung.com>
Tue, 15 Apr 2025 10:54:09 +0000 (16:24 +0530)
committerBot Blink <blinkbot@samsung.com>
Thu, 17 Apr 2025 09:35:54 +0000 (09:35 +0000)
removing the "@" search feature along with suggestion on omnibox popup.
Change-Id: I47ec1d2998011a39cc675da462ad9bdd91a6340f
Signed-off-by: Shubham Gupta <shubham.g5@samsung.com>
components/omnibox/browser/builtin_provider.cc
components/omnibox/browser/keyword_provider.cc

index b272c194eb5ad76eadf811c9aaa4d6be987e7ebd..5634f088731fa86856c4719f0a5a867cc81a0cfb 100644 (file)
@@ -62,6 +62,7 @@ void BuiltinProvider::DoStarterPackAutocompletion(
 #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
   // When the user's input begins with '@', we want to prioritize providing
   // suggestions for all active starter pack search engines.
+#if !defined(SAMSUNG_NEXT_BROWSER)
   bool starts_with_starter_pack_symbol = base::StartsWith(
       input.text(), u"@", base::CompareCase::INSENSITIVE_ASCII);
 
@@ -75,6 +76,7 @@ void BuiltinProvider::DoStarterPackAutocompletion(
       }
     }
   }
+#endif
 #endif  // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
 }
 
index f0c77a9ecdbaed47d6a64bb729e0ff6f55ff5ea7..9ba4eaa9315b0a4d1ba0092f22471fc5e645ea7a 100644 (file)
@@ -245,6 +245,14 @@ std::u16string KeywordProvider::GetKeywordForText(
 
   // The built-in history keyword mode is disabled in incognito mode.  Don't
   // provide a keyword in that case.
+#if defined(SAMSUNG_NEXT_BROWSER)
+  if (template_url->starter_pack_id() == TemplateURLStarterPackData::kHistory ||
+      template_url->starter_pack_id() ==
+          TemplateURLStarterPackData::kBookmarks ||
+      template_url->starter_pack_id() == TemplateURLStarterPackData::kTabs) {
+    return std::u16string();
+  }
+#endif
   if (client_->IsOffTheRecord() &&
       template_url->starter_pack_id() == TemplateURLStarterPackData::kHistory) {
     return std::u16string();