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

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: Rebase Created 5 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/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 0b42119eeb62657b25258ead8818aa769c92487d..261aecd45a2e0442078d2339c84ffe983be33114 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
@@ -57,7 +57,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;
@@ -134,7 +134,7 @@ const GURL& ChromeOmniboxClient::GetURL() const {
}
bool ChromeOmniboxClient::IsInstantNTP() const {
- return chrome::IsInstantNTP(controller_->GetWebContents());
+ return search::IsInstantNTP(controller_->GetWebContents());
}
bool ChromeOmniboxClient::IsSearchResultsPage() const {
@@ -204,9 +204,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) {
@@ -290,11 +290,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);
}

Powered by Google App Engine
This is Rietveld 408576698