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

Side by Side Diff: components/omnibox/browser/omnibox_field_trial.h

Issue 2965173002: Add ContextualSuggestionsService to Omnibox (Closed)
Patch Set: Created 3 years, 5 months 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
OLDNEW
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_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14 matching lines...) Expand all
25 namespace omnibox { 25 namespace omnibox {
26 26
27 extern const base::Feature kNewOmniboxAnswerTypes; 27 extern const base::Feature kNewOmniboxAnswerTypes;
28 extern const base::Feature kOmniboxEntitySuggestions; 28 extern const base::Feature kOmniboxEntitySuggestions;
29 extern const base::Feature kOmniboxTailSuggestions; 29 extern const base::Feature kOmniboxTailSuggestions;
30 extern const base::Feature kEnableClipboardProvider; 30 extern const base::Feature kEnableClipboardProvider;
31 extern const base::Feature kAndroidFakeboxDemotion; 31 extern const base::Feature kAndroidFakeboxDemotion;
32 extern const base::Feature kAndroidFakeboxDemotionOnPhones; 32 extern const base::Feature kAndroidFakeboxDemotionOnPhones;
33 extern const base::Feature kSearchProviderWarmUpOnFocus; 33 extern const base::Feature kSearchProviderWarmUpOnFocus;
34 extern const base::Feature kSearchProviderContextAllowHttpsUrls; 34 extern const base::Feature kSearchProviderContextAllowHttpsUrls;
35 extern const base::Feature kZeroSuggestRedirectToChrome;
36 extern const base::Feature kZeroSuggestSwapTitleAndUrl; 35 extern const base::Feature kZeroSuggestSwapTitleAndUrl;
37 extern const base::Feature kDisplayTitleForCurrentUrl; 36 extern const base::Feature kDisplayTitleForCurrentUrl;
38 extern const base::Feature kUIExperimentElideSuggestionUrlAfterHost; 37 extern const base::Feature kUIExperimentElideSuggestionUrlAfterHost;
39 extern const base::Feature kUIExperimentHideSuggestionUrlScheme; 38 extern const base::Feature kUIExperimentHideSuggestionUrlScheme;
40 extern const base::Feature kUIExperimentHideSuggestionUrlTrivialSubdomains; 39 extern const base::Feature kUIExperimentHideSuggestionUrlTrivialSubdomains;
41 extern const base::Feature kUIExperimentMaxAutocompleteMatches; 40 extern const base::Feature kUIExperimentMaxAutocompleteMatches;
42 extern const base::Feature kUIExperimentNarrowDropdown; 41 extern const base::Feature kUIExperimentNarrowDropdown;
43 extern const base::Feature kUIExperimentVerticalLayout; 42 extern const base::Feature kUIExperimentVerticalLayout;
44 extern const base::Feature kUIExperimentVerticalMargin; 43 extern const base::Feature kUIExperimentVerticalMargin;
45 } 44 }
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 418
420 // Returns the base relevance score for Physical Web omnibox suggestions when 419 // Returns the base relevance score for Physical Web omnibox suggestions when
421 // the user has clicked on the omnibox but has not typed anything yet. 420 // the user has clicked on the omnibox but has not typed anything yet.
422 static int GetPhysicalWebZeroSuggestBaseRelevance(); 421 static int GetPhysicalWebZeroSuggestBaseRelevance();
423 422
424 // Returns the base relevance score for Physical Web omnibox suggestions when 423 // Returns the base relevance score for Physical Web omnibox suggestions when
425 // the user has started typing in the omnibox. 424 // the user has started typing in the omnibox.
426 static int GetPhysicalWebAfterTypingBaseRelevance(); 425 static int GetPhysicalWebAfterTypingBaseRelevance();
427 426
428 // --------------------------------------------------------- 427 // ---------------------------------------------------------
429 // For experiment redirecting zero suggest requests to a service provided by
430 // the Chrome team.
431
432 // Returns true whether the user is in the field trial which redirects zero
433 // suggest requests to the service provided by the Chrome team.
434 static bool InZeroSuggestRedirectToChromeFieldTrial();
435
436 // Returns a string representing the address of the server where the zero
437 // suggest requests are being redirected. The return value is a URL
438 // (https://example.com/test) and it doesn't include any query component
439 // (no "?").
440 static std::string ZeroSuggestRedirectToChromeServerAddress();
441
442 // Returns a string representing the parameters that are sent to the
443 // alternative service providing zero suggestions. The returned value is
444 // properly escaped. It can be appended to the string representaiton of a
445 // request URL.
446 static std::string ZeroSuggestRedirectToChromeAdditionalFields();
447
448 // ---------------------------------------------------------
449 // Clipboard URL suggestions: 428 // Clipboard URL suggestions:
450 429
451 // The parameter "ClipboardURLMaximumAge" doesn't live in this file; instead 430 // The parameter "ClipboardURLMaximumAge" doesn't live in this file; instead
452 // it lives in 431 // it lives in
453 // components/open_from_clipboard/clipboard_recent_content.cc. 432 // components/open_from_clipboard/clipboard_recent_content.cc.
454 // Please see ClipboardRecentContent::MaximumAgeOfClipboard() for the usage 433 // Please see ClipboardRecentContent::MaximumAgeOfClipboard() for the usage
455 // of it. The parameter cannot live here because that component cannot 434 // of it. The parameter cannot live here because that component cannot
456 // include this component, else there would be a circular dependency. 435 // include this component, else there would be a circular dependency.
457 436
458 // --------------------------------------------------------- 437 // ---------------------------------------------------------
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 486
508 // Parameter names used by the experiment that limits the number of history 487 // Parameter names used by the experiment that limits the number of history
509 // urls indexed for suggestions. 488 // urls indexed for suggestions.
510 static const char kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevicesParam[]; 489 static const char kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevicesParam[];
511 static const char kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevicesParam[]; 490 static const char kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevicesParam[];
512 491
513 // Parameter names used by the Physical Web experimental scoring experiments. 492 // Parameter names used by the Physical Web experimental scoring experiments.
514 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; 493 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[];
515 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; 494 static const char kPhysicalWebAfterTypingBaseRelevanceParam[];
516 495
517 // Parameter names used by the experiment redirecting Zero Suggestion requests
518 // to a service provided by the Chrome team.
519 static const char kZeroSuggestRedirectToChromeServerAddressParam[];
520 static const char kZeroSuggestRedirectToChromeAdditionalFieldsParam[];
521
522 // Parameter names used by UI experiments. 496 // Parameter names used by UI experiments.
523 static const char kUIMaxAutocompleteMatchesParam[]; 497 static const char kUIMaxAutocompleteMatchesParam[];
524 static const char kUIVerticalMarginParam[]; 498 static const char kUIVerticalMarginParam[];
525 499
526 // The amount of time to wait before sending a new suggest request after the 500 // The amount of time to wait before sending a new suggest request after the
527 // previous one unless overridden by a field trial parameter. 501 // previous one unless overridden by a field trial parameter.
528 // Non-const because some unittests modify this value. 502 // Non-const because some unittests modify this value.
529 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; 503 static int kDefaultMinimumTimeBetweenSuggestQueriesMs;
530 504
531 private: 505 private:
(...skipping 15 matching lines...) Expand all
547 // prioritize different wildcard contexts, see the implementation. How to 521 // prioritize different wildcard contexts, see the implementation. How to
548 // interpret the value is left to the caller; this is rule-dependent. 522 // interpret the value is left to the caller; this is rule-dependent.
549 static std::string GetValueForRuleInContext( 523 static std::string GetValueForRuleInContext(
550 const std::string& rule, 524 const std::string& rule,
551 metrics::OmniboxEventProto::PageClassification page_classification); 525 metrics::OmniboxEventProto::PageClassification page_classification);
552 526
553 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); 527 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial);
554 }; 528 };
555 529
556 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ 530 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698