OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_SEARCH_SEARCH_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Returns true if |url| should be rendered in the Instant renderer process. | 73 // Returns true if |url| should be rendered in the Instant renderer process. |
74 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); | 74 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); |
75 | 75 |
76 // ----------------------------------------------------- | 76 // ----------------------------------------------------- |
77 // The following APIs are exposed for use in tests only. | 77 // The following APIs are exposed for use in tests only. |
78 // ----------------------------------------------------- | 78 // ----------------------------------------------------- |
79 | 79 |
80 // Forces the Instant Extended API to be enabled for tests. | 80 // Forces the Instant Extended API to be enabled for tests. |
81 void EnableInstantExtendedAPIForTesting(); | 81 void EnableInstantExtendedAPIForTesting(); |
82 | 82 |
83 // Forces query extraction to be enabled for tests. | |
84 void EnableQueryExtractionForTesting(); | |
85 | |
86 // Actually implements the logic for ShouldAssignURLToInstantRenderer(). | 83 // Actually implements the logic for ShouldAssignURLToInstantRenderer(). |
87 // Exposed for testing only. | 84 // Exposed for testing only. |
88 bool ShouldAssignURLToInstantRendererImpl(const GURL& url, | 85 bool ShouldAssignURLToInstantRendererImpl(const GURL& url, |
89 bool extended_api_enabled, | 86 bool extended_api_enabled, |
90 TemplateURL* template_url); | 87 TemplateURL* template_url); |
91 | 88 |
92 // Type for a collection of experiment configuration parameters. | 89 // Type for a collection of experiment configuration parameters. |
93 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; | 90 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; |
94 | 91 |
95 // Given a field trial group name, parses out the group number and configuration | 92 // Given a field trial group name, parses out the group number and configuration |
(...skipping 29 matching lines...) Expand all Loading... |
125 | 122 |
126 // Coerces the commandline Instant URL to look like a template URL, so that we | 123 // Coerces the commandline Instant URL to look like a template URL, so that we |
127 // can extract search terms from it. | 124 // can extract search terms from it. |
128 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url, | 125 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url, |
129 const TemplateURLRef& ref); | 126 const TemplateURLRef& ref); |
130 | 127 |
131 } // namespace search | 128 } // namespace search |
132 } // namespace chrome | 129 } // namespace chrome |
133 | 130 |
134 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_H_ | 131 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_H_ |
OLD | NEW |