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

Side by Side Diff: chrome/browser/search/search.h

Issue 73613002: InstantExtended: remove old flags, add new flag for query extraction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search/instant_unittest_base.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Exposed for testing. 154 // Exposed for testing.
155 bool ShouldUseCacheableNTP(); 155 bool ShouldUseCacheableNTP();
156 156
157 // Returns true if the Instant NTP should be shown and false if not. 157 // Returns true if the Instant NTP should be shown and false if not.
158 bool ShouldShowInstantNTP(); 158 bool ShouldShowInstantNTP();
159 159
160 // Returns true if the recent tabs link should be shown on the local NTP in 160 // Returns true if the recent tabs link should be shown on the local NTP in
161 // field trials. 161 // field trials.
162 bool ShouldShowRecentTabsOnNTP(); 162 bool ShouldShowRecentTabsOnNTP();
163 163
164 // Returns true if Instant Extended should be disabled on the search results
165 // page.
166 bool ShouldSuppressInstantExtendedOnSRP();
167
168 // Returns when we should show a search button in the omnibox. This may be any 164 // Returns when we should show a search button in the omnibox. This may be any
169 // of several values, some of which depend on whether the underlying state of 165 // of several values, some of which depend on whether the underlying state of
170 // the page would normally be to perform search term replacement; see also 166 // the page would normally be to perform search term replacement; see also
171 // ToolbarModel::WouldPerformSearchTermReplacement(). 167 // ToolbarModel::WouldPerformSearchTermReplacement().
172 DisplaySearchButtonConditions GetDisplaySearchButtonConditions(); 168 DisplaySearchButtonConditions GetDisplaySearchButtonConditions();
173 169
174 // Returns true if the origin chip should be shown next to the omnibox. This 170 // Returns true if the origin chip should be shown next to the omnibox. This
175 // also includes the related changes to the omnibox. 171 // also includes the related changes to the omnibox.
176 bool ShouldDisplayOriginChip(); 172 bool ShouldDisplayOriginChip();
177 173
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 InstantSupportState GetInstantSupportStateFromNavigationEntry( 217 InstantSupportState GetInstantSupportStateFromNavigationEntry(
222 const content::NavigationEntry& entry); 218 const content::NavigationEntry& entry);
223 219
224 // Returns true if the field trial flag is enabled to prefetch results on SRP. 220 // Returns true if the field trial flag is enabled to prefetch results on SRP.
225 bool ShouldPrefetchSearchResultsOnSRP(); 221 bool ShouldPrefetchSearchResultsOnSRP();
226 222
227 // ----------------------------------------------------- 223 // -----------------------------------------------------
228 // The following APIs are exposed for use in tests only. 224 // The following APIs are exposed for use in tests only.
229 // ----------------------------------------------------- 225 // -----------------------------------------------------
230 226
231 // Forces the Instant Extended API to be enabled for tests. 227 // Forces query in the omnibox to be on for tests.
232 void EnableInstantExtendedAPIForTesting(); 228 void EnableQueryExtractionForTesting();
233
234 // Forces the Instant Extended API to be disabled for tests.
235 void DisableInstantExtendedAPIForTesting();
236 229
237 // Type for a collection of experiment configuration parameters. 230 // Type for a collection of experiment configuration parameters.
238 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; 231 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags;
239 232
240 // Finds the active field trial group name and parses out the group number and 233 // Finds the active field trial group name and parses out the group number and
241 // configuration flags. On success, |flags| will be filled with the field trial 234 // configuration flags. On success, |flags| will be filled with the field trial
242 // flags. |flags| must not be NULL. If not NULL, |group_number| will receive the 235 // flags. |flags| must not be NULL. If not NULL, |group_number| will receive the
243 // experiment group number. 236 // experiment group number.
244 // Returns true iff the active field trial is successfully parsed and not 237 // Returns true iff the active field trial is successfully parsed and not
245 // disabled. 238 // disabled.
(...skipping 26 matching lines...) Expand all
272 // Returns the Cacheable New Tab Page URL for the given |profile|. 265 // Returns the Cacheable New Tab Page URL for the given |profile|.
273 GURL GetNewTabPageURL(Profile* profile); 266 GURL GetNewTabPageURL(Profile* profile);
274 267
275 // Let tests reset the gate that prevents metrics from being sent more than 268 // Let tests reset the gate that prevents metrics from being sent more than
276 // once. 269 // once.
277 void ResetInstantExtendedOptInStateGateForTest(); 270 void ResetInstantExtendedOptInStateGateForTest();
278 271
279 } // namespace chrome 272 } // namespace chrome
280 273
281 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 274 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_unittest_base.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698