| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SEARCH_SEARCH_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ | 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 // Sets the Instant support |state| in the navigation |entry|. | 167 // Sets the Instant support |state| in the navigation |entry|. |
| 168 void SetInstantSupportStateInNavigationEntry(InstantSupportState state, | 168 void SetInstantSupportStateInNavigationEntry(InstantSupportState state, |
| 169 content::NavigationEntry* entry); | 169 content::NavigationEntry* entry); |
| 170 | 170 |
| 171 // Returns the Instant support state attached to the NavigationEntry, or | 171 // Returns the Instant support state attached to the NavigationEntry, or |
| 172 // INSTANT_SUPPORT_UNKNOWN otherwise. | 172 // INSTANT_SUPPORT_UNKNOWN otherwise. |
| 173 InstantSupportState GetInstantSupportStateFromNavigationEntry( | 173 InstantSupportState GetInstantSupportStateFromNavigationEntry( |
| 174 const content::NavigationEntry& entry); | 174 const content::NavigationEntry& entry); |
| 175 | 175 |
| 176 // Returns true if the field trial flag is enabled to prefetch results on SRP. | |
| 177 bool ShouldPrefetchSearchResultsOnSRP(); | |
| 178 | |
| 179 // ----------------------------------------------------- | 176 // ----------------------------------------------------- |
| 180 // The following APIs are exposed for use in tests only. | 177 // The following APIs are exposed for use in tests only. |
| 181 // ----------------------------------------------------- | 178 // ----------------------------------------------------- |
| 182 | 179 |
| 183 // Returns the Cacheable New Tab Page URL for the given |profile|. | 180 // Returns the Cacheable New Tab Page URL for the given |profile|. |
| 184 GURL GetNewTabPageURL(Profile* profile); | 181 GURL GetNewTabPageURL(Profile* profile); |
| 185 | 182 |
| 186 // Returns true if 'use_alternate_instant_url' flag is set to true in field | 183 // Returns true if 'use_alternate_instant_url' flag is set to true in field |
| 187 // trials to use an alternate Instant search base page URL for prefetching | 184 // trials to use an alternate Instant search base page URL for prefetching |
| 188 // search results. This allows experimentation of Instant search. | 185 // search results. This allows experimentation of Instant search. |
| 189 bool ShouldUseAltInstantURL(); | 186 bool ShouldUseAltInstantURL(); |
| 190 | 187 |
| 191 // Returns true if 'use_search_path_for_instant' flag is set to true in field | 188 // Returns true if 'use_search_path_for_instant' flag is set to true in field |
| 192 // trials to use an '/search' path in an alternate Instant search base page URL | 189 // trials to use an '/search' path in an alternate Instant search base page URL |
| 193 // for prefetching search results. This allows experimentation of Instant | 190 // for prefetching search results. This allows experimentation of Instant |
| 194 // search. | 191 // search. |
| 195 bool ShouldUseSearchPathForInstant(); | 192 bool ShouldUseSearchPathForInstant(); |
| 196 | 193 |
| 197 } // namespace search | 194 } // namespace search |
| 198 | 195 |
| 199 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 196 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |