| 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_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| 6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 6 #define CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 // bundled omnibox field trial. | 263 // bundled omnibox field trial. |
| 264 | 264 |
| 265 // Returns true if BookmarkIndex should index the URL of bookmarks | 265 // Returns true if BookmarkIndex should index the URL of bookmarks |
| 266 // (not only the titles) and search for / mark matches in the URLs, | 266 // (not only the titles) and search for / mark matches in the URLs, |
| 267 // and BookmarkProvider should score bookmarks based on both the | 267 // and BookmarkProvider should score bookmarks based on both the |
| 268 // matches in bookmark title and URL. Returns false if the bookmarks | 268 // matches in bookmark title and URL. Returns false if the bookmarks |
| 269 // index URLs experiment isn't active. | 269 // index URLs experiment isn't active. |
| 270 static bool BookmarksIndexURLsValue(); | 270 static bool BookmarksIndexURLsValue(); |
| 271 | 271 |
| 272 // --------------------------------------------------------- | 272 // --------------------------------------------------------- |
| 273 // For the DisableInlining experiment that's part of the bundled omnibox |
| 274 // field trial. |
| 275 |
| 276 // Returns true if AutocompleteResult should prevent any suggestion with |
| 277 // a non-empty |inline_autocomplete| from being the default match. In |
| 278 // other words, prevent an inline autocompletion from appearing as the |
| 279 // top suggestion / within the omnibox itself, reordering matches as |
| 280 // necessary to make this true. Returns false if the experiment isn't |
| 281 // active. |
| 282 static bool DisableInlining(); |
| 283 |
| 284 // --------------------------------------------------------- |
| 273 // Exposed publicly for the sake of unittests. | 285 // Exposed publicly for the sake of unittests. |
| 274 static const char kBundledExperimentFieldTrialName[]; | 286 static const char kBundledExperimentFieldTrialName[]; |
| 275 // Rule names used by the bundled experiment. | 287 // Rule names used by the bundled experiment. |
| 276 static const char kShortcutsScoringMaxRelevanceRule[]; | 288 static const char kShortcutsScoringMaxRelevanceRule[]; |
| 277 static const char kSearchHistoryRule[]; | 289 static const char kSearchHistoryRule[]; |
| 278 static const char kDemoteByTypeRule[]; | 290 static const char kDemoteByTypeRule[]; |
| 279 static const char kHQPBookmarkValueRule[]; | 291 static const char kHQPBookmarkValueRule[]; |
| 280 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; | 292 static const char kHQPDiscountFrecencyWhenFewVisitsRule[]; |
| 281 static const char kHQPAllowMatchInTLDRule[]; | 293 static const char kHQPAllowMatchInTLDRule[]; |
| 282 static const char kHQPAllowMatchInSchemeRule[]; | 294 static const char kHQPAllowMatchInSchemeRule[]; |
| 283 static const char kZeroSuggestRule[]; | 295 static const char kZeroSuggestRule[]; |
| 284 static const char kZeroSuggestVariantRule[]; | 296 static const char kZeroSuggestVariantRule[]; |
| 285 static const char kBookmarksIndexURLsRule[]; | 297 static const char kBookmarksIndexURLsRule[]; |
| 298 static const char kDisableInliningRule[]; |
| 286 | 299 |
| 287 // Parameter names used by the HUP new scoring experiments. | 300 // Parameter names used by the HUP new scoring experiments. |
| 288 static const char kHUPNewScoringEnabledParam[]; | 301 static const char kHUPNewScoringEnabledParam[]; |
| 289 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; | 302 static const char kHUPNewScoringTypedCountRelevanceCapParam[]; |
| 290 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; | 303 static const char kHUPNewScoringTypedCountHalfLifeTimeParam[]; |
| 291 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; | 304 static const char kHUPNewScoringTypedCountScoreBucketsParam[]; |
| 292 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; | 305 static const char kHUPNewScoringVisitedCountRelevanceCapParam[]; |
| 293 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; | 306 static const char kHUPNewScoringVisitedCountHalfLifeTimeParam[]; |
| 294 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; | 307 static const char kHUPNewScoringVisitedCountScoreBucketsParam[]; |
| 295 | 308 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 312 // prioritize different wildcard contexts, see the implementation. How to | 325 // prioritize different wildcard contexts, see the implementation. How to |
| 313 // interpret the value is left to the caller; this is rule-dependent. | 326 // interpret the value is left to the caller; this is rule-dependent. |
| 314 static std::string GetValueForRuleInContext( | 327 static std::string GetValueForRuleInContext( |
| 315 const std::string& rule, | 328 const std::string& rule, |
| 316 AutocompleteInput::PageClassification page_classification); | 329 AutocompleteInput::PageClassification page_classification); |
| 317 | 330 |
| 318 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); | 331 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); |
| 319 }; | 332 }; |
| 320 | 333 |
| 321 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ | 334 #endif // CHROME_BROWSER_OMNIBOX_OMNIBOX_FIELD_TRIAL_H_ |
| OLD | NEW |