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

Side by Side Diff: components/search/search.h

Issue 2526753002: Instant cleanup: Remove abandoned EmbeddedSearch Android-only field trials (Closed)
Patch Set: review Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SEARCH_SEARCH_H_ 5 #ifndef COMPONENTS_SEARCH_SEARCH_H_
6 #define COMPONENTS_SEARCH_SEARCH_H_ 6 #define COMPONENTS_SEARCH_SEARCH_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 13
14 class GURL; 14 class GURL;
15 class TemplateURL; 15 class TemplateURL;
16 16
17 namespace search { 17 namespace search {
18 18
19 // Returns whether the Instant Extended API is enabled. 19 // Returns whether the Instant Extended API is enabled. This is always true on
20 // desktop and false on mobile.
20 bool IsInstantExtendedAPIEnabled(); 21 bool IsInstantExtendedAPIEnabled();
21 22
22 // Returns the value to pass to the &espv CGI parameter when loading the 23 // Returns the value to pass to the &espv CGI parameter when loading the
23 // embedded search page from the user's default search provider. Returns 0 if 24 // embedded search page from the user's default search provider. Returns 0 if
24 // the Instant Extended API is not enabled. 25 // the Instant Extended API is not enabled.
25 uint64_t EmbeddedSearchPageVersion(); 26 uint64_t EmbeddedSearchPageVersion();
26 27
27 // Type for a collection of experiment configuration parameters. 28 // Type for a collection of experiment configuration parameters.
28 typedef base::StringPairs FieldTrialFlags; 29 typedef base::StringPairs FieldTrialFlags;
29 30
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Returns a string that will cause the search results page to update 64 // Returns a string that will cause the search results page to update
64 // incrementally. Currently, Instant Extended passes a different param to 65 // incrementally. Currently, Instant Extended passes a different param to
65 // search results pages that also has this effect, so by default this function 66 // search results pages that also has this effect, so by default this function
66 // returns the empty string when Instant Extended is enabled. However, when 67 // returns the empty string when Instant Extended is enabled. However, when
67 // doing instant search result prerendering, we still need to pass this param, 68 // doing instant search result prerendering, we still need to pass this param,
68 // as Instant Extended does not cause incremental updates by default for the 69 // as Instant Extended does not cause incremental updates by default for the
69 // prerender page. Callers should set |for_prerender| in this case to force 70 // prerender page. Callers should set |for_prerender| in this case to force
70 // the returned string to be non-empty. 71 // the returned string to be non-empty.
71 std::string ForceInstantResultsParam(bool for_prerender); 72 std::string ForceInstantResultsParam(bool for_prerender);
72 73
73 // Returns true if 'prefetch_results' flag is set to true in field trials to 74 // Returns whether to prefetch high-confidence search suggestions. True iff
74 // prefetch high-confidence search suggestions. 75 // the Instant Extended API is enabled.
75 bool ShouldPrefetchSearchResults(); 76 bool ShouldPrefetchSearchResults();
76 77
77 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field 78 // Returns whether to reuse the prerendered page to commit any search query.
78 // trials to reuse the prerendered page to commit any search query. 79 // True iff the Instant Extended API is enabled.
79 bool ShouldReuseInstantSearchBasePage(); 80 bool ShouldReuseInstantSearchBasePage();
80 81
81 // |url| should either have a secure scheme or have a non-HTTPS base URL that 82 // |url| should either have a secure scheme or have a non-HTTPS base URL that
82 // the user specified using --google-base-url. (This allows testers to use 83 // the user specified using --google-base-url. (This allows testers to use
83 // --google-base-url to point at non-HTTPS servers, which eases testing.) 84 // --google-base-url to point at non-HTTPS servers, which eases testing.)
84 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url); 85 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url);
85 86
86 } // namespace search 87 } // namespace search
87 88
88 #endif // COMPONENTS_SEARCH_SEARCH_H_ 89 #endif // COMPONENTS_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « no previous file | components/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698