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

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

Issue 360373006: Enable prefetch-search-results on Desktop Chrome by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DCHECK Created 6 years, 5 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_ipc_router.cc
diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
index 889ea9cb4ac4bf829ac4a0938788be8ff38e6d1b..c81a1e99229a4ff3346a81b537cd20bde1bdc59f 100644
--- a/chrome/browser/ui/search/search_ipc_router.cc
+++ b/chrome/browser/ui/search/search_ipc_router.cc
@@ -74,10 +74,11 @@ void SearchIPCRouter::SetDisplayInstantResults() {
return;
bool is_search_results_page = !chrome::GetSearchTerms(web_contents()).empty();
+ bool display_instant_results = is_search_results_page ?
+ chrome::ShouldPrefetchSearchResultsOnSRP() :
+ chrome::ShouldPrefetchSearchResults();
Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(
- routing_id(),
- (is_search_results_page && chrome::ShouldPrefetchSearchResultsOnSRP()) ||
- chrome::ShouldPrefetchSearchResults()));
+ routing_id(), display_instant_results));
}
void SearchIPCRouter::SetSuggestionToPrefetch(

Powered by Google App Engine
This is Rietveld 408576698