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

Unified Diff: chrome/browser/ui/omnibox/chrome_omnibox_client.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/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 67ecacc22858c223cd0fc37323fa4840584d2d1e..52567d597a4644de97363cc74cac58bf3806949b 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
@@ -59,7 +59,7 @@ namespace {
// shown); for other matches, we think the likelihood of the user selecting
// them is low enough that prefetching isn't worth doing.
const AutocompleteMatch* GetMatchToPrefetch(const AutocompleteResult& result) {
- if (chrome::ShouldAllowPrefetchNonDefaultMatch()) {
+ if (search::ShouldAllowPrefetchNonDefaultMatch()) {
const AutocompleteResult::const_iterator prefetch_match = std::find_if(
result.begin(), result.end(), SearchProvider::ShouldPrefetch);
return prefetch_match != result.end() ? &(*prefetch_match) : NULL;
@@ -136,7 +136,7 @@ const GURL& ChromeOmniboxClient::GetURL() const {
}
bool ChromeOmniboxClient::IsInstantNTP() const {
- return chrome::IsInstantNTP(controller_->GetWebContents());
+ return search::IsInstantNTP(controller_->GetWebContents());
}
bool ChromeOmniboxClient::IsSearchResultsPage() const {
@@ -222,9 +222,9 @@ void ChromeOmniboxClient::OnResultChanged(
const AutocompleteResult& result,
bool default_match_changed,
const base::Callback<void(const SkBitmap& bitmap)>& on_bitmap_fetched) {
- if (chrome::IsInstantExtendedAPIEnabled() &&
+ if (search::IsInstantExtendedAPIEnabled() &&
((default_match_changed && result.default_match() != result.end()) ||
- (chrome::ShouldAllowPrefetchNonDefaultMatch() && !result.empty()))) {
+ (search::ShouldAllowPrefetchNonDefaultMatch() && !result.empty()))) {
InstantSuggestion prefetch_suggestion;
const AutocompleteMatch* match_to_prefetch = GetMatchToPrefetch(result);
if (match_to_prefetch) {
@@ -312,11 +312,11 @@ void ChromeOmniboxClient::DoPreconnect(const AutocompleteMatch& match) {
void ChromeOmniboxClient::SetSuggestionToPrefetch(
const InstantSuggestion& suggestion) {
- DCHECK(chrome::IsInstantExtendedAPIEnabled());
+ DCHECK(search::IsInstantExtendedAPIEnabled());
content::WebContents* web_contents = controller_->GetWebContents();
if (web_contents &&
SearchTabHelper::FromWebContents(web_contents)->IsSearchResultsPage()) {
- if (chrome::ShouldPrefetchSearchResultsOnSRP()) {
+ if (search::ShouldPrefetchSearchResultsOnSRP()) {
SearchTabHelper::FromWebContents(web_contents)->
SetSuggestionToPrefetch(suggestion);
}
« no previous file with comments | « chrome/browser/ui/extensions/extension_install_ui_default.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698