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

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

Issue 2651763002: Cleanup in components/search and chrome/browser/search (Closed)
Patch Set: for each Created 3 years, 11 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 | « chrome/browser/ui/search/instant_search_prerenderer.h ('k') | components/search/search.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 869357d6af421895f01a68d930ce4b3875a8ebda..921efa013e1a4909326cec5f2d69329fa26779cf 100644
--- a/chrome/browser/ui/search/instant_search_prerenderer.cc
+++ b/chrome/browser/ui/search/instant_search_prerenderer.cc
@@ -114,8 +114,7 @@ bool InstantSearchPrerenderer::CanCommitQuery(
content::WebContents* source,
const base::string16& query) const {
if (!source || query.empty() || !prerender_handle_ ||
- !prerender_handle_->IsFinishedLoading() ||
- !prerender_contents() || !QueryMatchesPrefetch(query)) {
+ !prerender_handle_->IsFinishedLoading() || !prerender_contents()) {
return false;
}
@@ -131,7 +130,6 @@ bool InstantSearchPrerenderer::UsePrerenderedPage(
prerender::PrerenderManagerFactory::GetForBrowserContext(profile_);
if (search_terms.empty() || !params->target_contents ||
!prerender_contents() || !prerender_manager ||
- !QueryMatchesPrefetch(search_terms) ||
params->disposition != WindowOpenDisposition::CURRENT_TAB) {
Cancel();
return false;
@@ -182,9 +180,3 @@ content::WebContents* InstantSearchPrerenderer::prerender_contents() const {
return (prerender_handle_ && prerender_handle_->contents()) ?
prerender_handle_->contents()->prerender_contents() : NULL;
}
-
-bool InstantSearchPrerenderer::QueryMatchesPrefetch(
- const base::string16& query) const {
- return search::ShouldReuseInstantSearchBasePage() ||
- last_instant_suggestion_.text == query;
-}
« no previous file with comments | « chrome/browser/ui/search/instant_search_prerenderer.h ('k') | components/search/search.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698