Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3777)

Unified Diff: chrome/browser/search/search.cc

Issue 2232863002: Remove search::GetSearchTerms since it always returns empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_query_extract
Patch Set: Mac Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 63815c452eed4910bfd7d752003ce7e76c117383..78e9e8fb5816d991ad8464390158e085a6eb4f75 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -183,12 +183,6 @@ bool IsInstantURL(const GURL& url, Profile* profile) {
return MatchesOriginAndPath(url, instant_url);
}
-base::string16 GetSearchTermsImpl(const content::WebContents* contents,
- const content::NavigationEntry* entry) {
- // TODO(treib): Remove this and update callers accordingly. crbug.com/627747
- return base::string16();
-}
-
bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
#if defined(ENABLE_SUPERVISED_USERS)
SupervisedUserService* supervised_user_service =
@@ -306,33 +300,6 @@ bool IsQueryExtractionAllowedForURL(Profile* profile, const GURL& url) {
return template_url && IsSuitableURLForInstant(url, template_url);
}
-base::string16 GetSearchTermsFromNavigationEntry(
- const content::NavigationEntry* entry) {
- base::string16 search_terms;
- if (entry)
- entry->GetExtraData(sessions::kSearchTermsKey, &search_terms);
- return search_terms;
-}
-
-base::string16 GetSearchTerms(const content::WebContents* contents) {
- if (!contents)
- return base::string16();
-
- const content::NavigationEntry* entry =
- contents->GetController().GetVisibleEntry();
- if (!entry)
- return base::string16();
-
- if (IsInstantExtendedAPIEnabled()) {
- InstantSupportState state =
- GetInstantSupportStateFromNavigationEntry(*entry);
Peter Kasting 2016/08/13 05:03:44 This was the only caller of this function, so it s
Marc Treib 2016/08/16 12:00:17 Thanks! Done.
- if (state == INSTANT_SUPPORT_NO)
- return base::string16();
- }
-
- return GetSearchTermsImpl(contents, entry);
-}
-
bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
return url.is_valid() &&
profile &&

Powered by Google App Engine
This is Rietveld 408576698