OLD | NEW |
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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_split.h" |
14 | 15 |
15 namespace chrome { | 16 namespace chrome { |
16 | 17 |
17 // Returns whether the Instant Extended API is enabled. | 18 // Returns whether the Instant Extended API is enabled. |
18 bool IsInstantExtendedAPIEnabled(); | 19 bool IsInstantExtendedAPIEnabled(); |
19 | 20 |
20 // Returns the value to pass to the &espv CGI parameter when loading the | 21 // Returns the value to pass to the &espv CGI parameter when loading the |
21 // embedded search page from the user's default search provider. Returns 0 if | 22 // embedded search page from the user's default search provider. Returns 0 if |
22 // the Instant Extended API is not enabled. | 23 // the Instant Extended API is not enabled. |
23 uint64 EmbeddedSearchPageVersion(); | 24 uint64 EmbeddedSearchPageVersion(); |
24 | 25 |
25 // Type for a collection of experiment configuration parameters. | 26 // Type for a collection of experiment configuration parameters. |
26 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; | 27 typedef base::StringPairs FieldTrialFlags; |
27 | 28 |
28 // Finds the active field trial group name and parses out the configuration | 29 // Finds the active field trial group name and parses out the configuration |
29 // flags. On success, |flags| will be filled with the field trial flags. |flags| | 30 // flags. On success, |flags| will be filled with the field trial flags. |flags| |
30 // must not be NULL. Returns true iff the active field trial is successfully | 31 // must not be NULL. Returns true iff the active field trial is successfully |
31 // parsed and not disabled. | 32 // parsed and not disabled. |
32 // Note that |flags| may be successfully populated in some cases when false is | 33 // Note that |flags| may be successfully populated in some cases when false is |
33 // returned - in these cases it should not be used. | 34 // returned - in these cases it should not be used. |
34 // Exposed for testing only. | 35 // Exposed for testing only. |
35 bool GetFieldTrialInfo(FieldTrialFlags* flags); | 36 bool GetFieldTrialInfo(FieldTrialFlags* flags); |
36 | 37 |
(...skipping 18 matching lines...) Expand all Loading... |
55 const FieldTrialFlags& flags); | 56 const FieldTrialFlags& flags); |
56 | 57 |
57 // Returns true if 'hide_verbatim' flag is enabled in field trials | 58 // Returns true if 'hide_verbatim' flag is enabled in field trials |
58 // to hide the top match in the native suggestions dropdown if it is a verbatim | 59 // to hide the top match in the native suggestions dropdown if it is a verbatim |
59 // match. See comments on ShouldHideTopMatch in autocomplete_result.h. | 60 // match. See comments on ShouldHideTopMatch in autocomplete_result.h. |
60 bool ShouldHideTopVerbatimMatch(); | 61 bool ShouldHideTopVerbatimMatch(); |
61 | 62 |
62 } // namespace chrome | 63 } // namespace chrome |
63 | 64 |
64 #endif // COMPONENTS_SEARCH_SEARCH_H_ | 65 #endif // COMPONENTS_SEARCH_SEARCH_H_ |
OLD | NEW |