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

Unified Diff: chrome/browser/ui/omnibox/chrome_omnibox_client.cc

Issue 2207883002: Remove "!IsSearchResultsPage" check in ChromeOmniboxClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_prefetch_srp
Patch Set: 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/omnibox/chrome_omnibox_client.cc
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
index 0444a0ac5bd3ff56714ae59c535cecca4e6b015a..25dbccf5243cc28f03c1853bfdc37b6c7efc18d0 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
@@ -457,17 +457,10 @@ void ChromeOmniboxClient::DoPreconnect(const AutocompleteMatch& match) {
void ChromeOmniboxClient::SetSuggestionToPrefetch(
const InstantSuggestion& suggestion) {
DCHECK(search::IsInstantExtendedAPIEnabled());
- content::WebContents* web_contents = controller_->GetWebContents();
- // TODO(treib): This check should probably be removed - IsSearchResultsPage
- // will always return false here, because it'll only be true for pages
- // rendered in the Instant process. crbug.com/627747
- if (!web_contents ||
- !SearchTabHelper::FromWebContents(web_contents)->IsSearchResultsPage()) {
- InstantSearchPrerenderer* prerenderer =
- InstantSearchPrerenderer::GetForProfile(profile_);
- if (prerenderer)
- prerenderer->Prerender(suggestion);
- }
+ InstantSearchPrerenderer* prerenderer =
+ InstantSearchPrerenderer::GetForProfile(profile_);
+ if (prerenderer)
+ prerenderer->Prerender(suggestion);
}
void ChromeOmniboxClient::OnBitmapFetched(const BitmapFetchedCallback& callback,

Powered by Google App Engine
This is Rietveld 408576698