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

Unified Diff: chrome/browser/search/search.h

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
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search.h
diff --git a/chrome/browser/search/search.h b/chrome/browser/search/search.h
index 1605f6db270a651198a2f28a649769ee596a36a8..54356417b359afb77dcbf0dced71b21035fe71d2 100644
--- a/chrome/browser/search/search.h
+++ b/chrome/browser/search/search.h
@@ -28,7 +28,7 @@ namespace user_prefs {
class PrefRegistrySyncable;
}
-namespace chrome {
+namespace search {
// For reporting Cacheable NTP navigations.
enum CacheableNTPLoad {
@@ -47,34 +47,9 @@ enum OptInState {
INSTANT_EXTENDED_OPT_IN_STATE_ENUM_COUNT,
};
-// Use this value for "start margin" to prevent the "es_sm" parameter from
-// being used.
-extern const int kDisableStartMargin;
-
// Returns whether the suggest is enabled for the given |profile|.
bool IsSuggestPrefEnabled(Profile* profile);
-// Returns a string indicating whether InstantExtended is enabled, suitable
-// for adding as a query string param to the homepage or search requests.
-// Returns an empty string otherwise.
-//
-// |for_search| should be set to true for search requests, in which case this
-// returns a non-empty string only if query extraction is enabled.
-std::string InstantExtendedEnabledParam(bool for_search);
-
-// Returns a string that will cause the search results page to update
-// incrementally. Currently, Instant Extended passes a different param to
-// search results pages that also has this effect, so by default this function
-// returns the empty string when Instant Extended is enabled. However, when
-// doing instant search result prerendering, we still need to pass this param,
-// as Instant Extended does not cause incremental updates by default for the
-// prerender page. Callers should set |for_prerender| in this case to force
-// the returned string to be non-empty.
-std::string ForceInstantResultsParam(bool for_prerender);
-
-// Returns whether query extraction is enabled.
-bool IsQueryExtractionEnabled();
-
// Extracts and returns search terms from |url|. Does not consider
// IsQueryExtractionEnabled() and Instant support state of the page and does
// not check for a privileged process, so most callers should use
@@ -148,24 +123,11 @@ std::vector<GURL> GetSearchURLs(Profile* profile);
// trials.
GURL GetSearchResultPrefetchBaseURL(Profile* profile);
-// Returns true if 'prefetch_results' flag is set to true in field trials to
-// prefetch high-confidence search suggestions.
-bool ShouldPrefetchSearchResults();
-
-// Returns true if 'allow_prefetch_non_default_match' flag is enabled in field
-// trials to allow prefetching the suggestion marked to be prefetched by the
-// suggest server even if it is not the default match.
-bool ShouldAllowPrefetchNonDefaultMatch();
-
// Returns true if 'prerender_instant_url_on_omnibox_focus' flag is enabled in
// field trials to prerender Instant search base page when the omnibox is
// focused.
bool ShouldPrerenderInstantUrlOnOmniboxFocus();
-// Returns true if 'reuse_instant_search_base_page' flag is set to true in field
-// trials to reuse the prerendered page to commit any search query.
-bool ShouldReuseInstantSearchBasePage();
-
// Returns the Local Instant URL of the New Tab Page.
// TODO(kmadhusu): Remove this function and update the call sites.
GURL GetLocalInstantURL(Profile* profile);
@@ -220,9 +182,6 @@ bool ShouldPrefetchSearchResultsOnSRP();
// The following APIs are exposed for use in tests only.
// -----------------------------------------------------
-// Forces query in the omnibox to be on for tests.
-void EnableQueryExtractionForTesting();
-
// Returns the Cacheable New Tab Page URL for the given |profile|.
GURL GetNewTabPageURL(Profile* profile);
@@ -237,6 +196,6 @@ bool ShouldUseAltInstantURL();
// search.
bool ShouldUseSearchPathForInstant();
-} // namespace chrome
+} // namespace search
#endif // CHROME_BROWSER_SEARCH_SEARCH_H_
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698