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

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

Issue 2211533004: Remove SearchTabHelper::IsSearchResultsPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_search_prerenderer.cc
diff --git a/chrome/browser/ui/search/instant_search_prerenderer.cc b/chrome/browser/ui/search/instant_search_prerenderer.cc
index 4fd25a2fcf8f811e3d76276e867f39c405371282..9aa3ffd1bd96d1f88773155aae4493334a92fc05 100644
--- a/chrome/browser/ui/search/instant_search_prerenderer.cc
+++ b/chrome/browser/ui/search/instant_search_prerenderer.cc
@@ -22,12 +22,6 @@
namespace {
-// Returns true if the underlying page supports Instant search.
-bool PageSupportsInstantSearch(content::WebContents* contents) {
- // Search results page supports Instant search.
- return SearchTabHelper::FromWebContents(contents)->IsSearchResultsPage();
-}
-
// Returns true if |match| is associated with the default search provider.
bool MatchIsFromDefaultSearchProvider(const AutocompleteMatch& match,
Profile* profile) {
@@ -126,9 +120,7 @@ bool InstantSearchPrerenderer::CanCommitQuery(
return false;
}
- // InstantSearchPrerenderer can commit query to the prerendered page only if
- // the underlying |source| page doesn't support Instant search.
- return !PageSupportsInstantSearch(source);
+ return true;
}
bool InstantSearchPrerenderer::UsePrerenderedPage(
@@ -184,8 +176,7 @@ bool InstantSearchPrerenderer::IsAllowed(const AutocompleteMatch& match,
// This handles the by-far-the-most-common cases while still being simple and
// maintainable.
return source && AutocompleteMatch::IsSearchType(match.type) &&
- MatchIsFromDefaultSearchProvider(match, profile_) &&
- !PageSupportsInstantSearch(source);
+ MatchIsFromDefaultSearchProvider(match, profile_);
}
content::WebContents* InstantSearchPrerenderer::prerender_contents() const {
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698