| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool IsQueryExtractionEnabled(); | 81 bool IsQueryExtractionEnabled(); |
| 82 | 82 |
| 83 // Returns true if 'prefetch_results' flag is set to true in field trials to | 83 // Returns true if 'prefetch_results' flag is set to true in field trials to |
| 84 // prefetch high-confidence search suggestions. | 84 // prefetch high-confidence search suggestions. |
| 85 bool ShouldPrefetchSearchResults(); | 85 bool ShouldPrefetchSearchResults(); |
| 86 | 86 |
| 87 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field | 87 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field |
| 88 // trials to reuse the prerendered page to commit any search query. | 88 // trials to reuse the prerendered page to commit any search query. |
| 89 bool ShouldReuseInstantSearchBasePage(); | 89 bool ShouldReuseInstantSearchBasePage(); |
| 90 | 90 |
| 91 // Returns true if 'allow_prefetch_non_default_match' flag is enabled in field | |
| 92 // trials to allow prefetching the suggestion marked to be prefetched by the | |
| 93 // suggest server even if it is not the default match. | |
| 94 bool ShouldAllowPrefetchNonDefaultMatch(); | |
| 95 | |
| 96 // |url| should either have a secure scheme or have a non-HTTPS base URL that | 91 // |url| should either have a secure scheme or have a non-HTTPS base URL that |
| 97 // the user specified using --google-base-url. (This allows testers to use | 92 // the user specified using --google-base-url. (This allows testers to use |
| 98 // --google-base-url to point at non-HTTPS servers, which eases testing.) | 93 // --google-base-url to point at non-HTTPS servers, which eases testing.) |
| 99 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url); | 94 bool IsSuitableURLForInstant(const GURL& url, const TemplateURL* template_url); |
| 100 | 95 |
| 101 // ----------------------------------------------------- | 96 // ----------------------------------------------------- |
| 102 // The following APIs are exposed for use in tests only. | 97 // The following APIs are exposed for use in tests only. |
| 103 // ----------------------------------------------------- | 98 // ----------------------------------------------------- |
| 104 | 99 |
| 105 // Forces query in the omnibox to be on for tests. | 100 // Forces query in the omnibox to be on for tests. |
| 106 void EnableQueryExtractionForTesting(); | 101 void EnableQueryExtractionForTesting(); |
| 107 | 102 |
| 108 } // namespace search | 103 } // namespace search |
| 109 | 104 |
| 110 #endif // COMPONENTS_SEARCH_SEARCH_H_ | 105 #endif // COMPONENTS_SEARCH_SEARCH_H_ |
| OLD | NEW |