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

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

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 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_ipc_router.cc
diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
index a1b8554390f9b26114f0274c8964c1f02eb9fdf7..72598b24e363ebc75b62b4870f63050fb80fafbb 100644
--- a/chrome/browser/ui/search/search_ipc_router.cc
+++ b/chrome/browser/ui/search/search_ipc_router.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
#include "chrome/common/render_messages.h"
+#include "components/search/search.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/web_contents.h"
@@ -80,10 +81,10 @@ void SearchIPCRouter::SetDisplayInstantResults() {
if (!policy_->ShouldSendSetDisplayInstantResults())
return;
- bool is_search_results_page = !chrome::GetSearchTerms(web_contents()).empty();
- bool display_instant_results = is_search_results_page ?
- chrome::ShouldPrefetchSearchResultsOnSRP() :
- chrome::ShouldPrefetchSearchResults();
+ bool is_search_results_page = !search::GetSearchTerms(web_contents()).empty();
+ bool display_instant_results =
+ is_search_results_page ? search::ShouldPrefetchSearchResultsOnSRP()
+ : search::ShouldPrefetchSearchResults();
Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(
routing_id(), display_instant_results));
}
@@ -165,7 +166,7 @@ bool SearchIPCRouter::OnMessageReceived(const IPC::Message& message) {
Profile* profile =
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
- if (!chrome::IsRenderedInInstantProcess(web_contents(), profile))
+ if (!search::IsRenderedInInstantProcess(web_contents(), profile))
return false;
bool handled = true;

Powered by Google App Engine
This is Rietveld 408576698