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

Unified Diff: chrome/browser/ui/search/search_tab_helper.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/ui/search/search_tab_helper.cc
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index d962d6296e3249686cef37ada18411f9f99b49b3..140206394f86f78794dabedacdf56ace5075dd83 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -74,10 +74,6 @@ bool IsNTP(const content::WebContents* contents) {
return search::IsInstantNTP(contents);
}
-bool IsSearchResults(const content::WebContents* contents) {
- return !search::GetSearchTerms(contents).empty();
-}
-
bool IsLocal(const content::WebContents* contents) {
if (!contents)
return false;
@@ -476,9 +472,6 @@ void SearchTabHelper::UpdateMode(bool update_origin) {
if (IsNTP(web_contents_)) {
type = SearchMode::MODE_NTP;
origin = SearchMode::ORIGIN_NTP;
- } else if (IsSearchResults(web_contents_)) {
- type = SearchMode::MODE_SEARCH_RESULTS;
- origin = SearchMode::ORIGIN_SEARCH;
Peter Kasting 2016/08/13 05:03:44 This is the only non-unittest location that sets t
Marc Treib 2016/08/16 12:00:17 Yup, on my list :) I've added TODOs to the definit
}
if (!update_origin)
origin = model_.mode().origin;

Powered by Google App Engine
This is Rietveld 408576698