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

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

Issue 2526753002: Instant cleanup: Remove abandoned EmbeddedSearch Android-only field trials (Closed)
Patch Set: 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') | components/search/search.cc » ('J')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Returns a string that will cause the search results page to update 68 // Returns a string that will cause the search results page to update
68 // incrementally. Currently, Instant Extended passes a different param to 69 // incrementally. Currently, Instant Extended passes a different param to
69 // search results pages that also has this effect, so by default this function 70 // search results pages that also has this effect, so by default this function
70 // returns the empty string when Instant Extended is enabled. However, when 71 // returns the empty string when Instant Extended is enabled. However, when
71 // doing instant search result prerendering, we still need to pass this param, 72 // doing instant search result prerendering, we still need to pass this param,
72 // as Instant Extended does not cause incremental updates by default for the 73 // as Instant Extended does not cause incremental updates by default for the
73 // prerender page. Callers should set |for_prerender| in this case to force 74 // prerender page. Callers should set |for_prerender| in this case to force
74 // the returned string to be non-empty. 75 // the returned string to be non-empty.
75 std::string ForceInstantResultsParam(bool for_prerender); 76 std::string ForceInstantResultsParam(bool for_prerender);
76 77
77 // Returns true if 'prefetch_results' flag is set to true in field trials to 78 // Returns whether to prefetch high-confidence search suggestions. True iff
78 // prefetch high-confidence search suggestions. 79 // the Instant Extended API is enabled.
79 bool ShouldPrefetchSearchResults(); 80 bool ShouldPrefetchSearchResults();
80 81
81 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field 82 // Returns whether to reuse the prerendered page to commit any search query.
82 // trials to reuse the prerendered page to commit any search query. 83 // True iff the Instant Extended API is enabled.
83 bool ShouldReuseInstantSearchBasePage(); 84 bool ShouldReuseInstantSearchBasePage();
84 85
85 // |url| should either have a secure scheme or have a non-HTTPS base URL that 86 // |url| should either have a secure scheme or have a non-HTTPS base URL that
86 // the user specified using --google-base-url. (This allows testers to use 87 // the user specified using --google-base-url. (This allows testers to use
87 // --google-base-url to point at non-HTTPS servers, which eases testing.) 88 // --google-base-url to point at non-HTTPS servers, which eases testing.)
88 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url); 89 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url);
89 90
90 } // namespace search 91 } // namespace search
91 92
92 #endif // COMPONENTS_SEARCH_SEARCH_H_ 93 #endif // COMPONENTS_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « no previous file | components/search/search.cc » ('j') | components/search/search.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698