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

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

Issue 2965173002: Add ContextualSuggestionsService to Omnibox (Closed)
Patch Set: Move contextual suggestions service to c/o/b 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 // Returns the base relevance score for Physical Web omnibox suggestions when 420 // 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. 421 // the user has clicked on the omnibox but has not typed anything yet.
422 static int GetPhysicalWebZeroSuggestBaseRelevance(); 422 static int GetPhysicalWebZeroSuggestBaseRelevance();
423 423
424 // Returns the base relevance score for Physical Web omnibox suggestions when 424 // Returns the base relevance score for Physical Web omnibox suggestions when
425 // the user has started typing in the omnibox. 425 // the user has started typing in the omnibox.
426 static int GetPhysicalWebAfterTypingBaseRelevance(); 426 static int GetPhysicalWebAfterTypingBaseRelevance();
427 427
428 // --------------------------------------------------------- 428 // ---------------------------------------------------------
429 // For experiment redirecting zero suggest requests to a service provided by
Mark P 2017/07/18 19:11:30 It would be nice to keep all the omnibox field tri
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: 429 // Clipboard URL suggestions:
450 430
451 // The parameter "ClipboardURLMaximumAge" doesn't live in this file; instead 431 // The parameter "ClipboardURLMaximumAge" doesn't live in this file; instead
452 // it lives in 432 // it lives in
453 // components/open_from_clipboard/clipboard_recent_content.cc. 433 // components/open_from_clipboard/clipboard_recent_content.cc.
454 // Please see ClipboardRecentContent::MaximumAgeOfClipboard() for the usage 434 // Please see ClipboardRecentContent::MaximumAgeOfClipboard() for the usage
455 // of it. The parameter cannot live here because that component cannot 435 // of it. The parameter cannot live here because that component cannot
456 // include this component, else there would be a circular dependency. 436 // include this component, else there would be a circular dependency.
457 437
458 // --------------------------------------------------------- 438 // ---------------------------------------------------------
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 487
508 // Parameter names used by the experiment that limits the number of history 488 // Parameter names used by the experiment that limits the number of history
509 // urls indexed for suggestions. 489 // urls indexed for suggestions.
510 static const char kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevicesParam[]; 490 static const char kMaxNumHQPUrlsIndexedAtStartupOnLowEndDevicesParam[];
511 static const char kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevicesParam[]; 491 static const char kMaxNumHQPUrlsIndexedAtStartupOnNonLowEndDevicesParam[];
512 492
513 // Parameter names used by the Physical Web experimental scoring experiments. 493 // Parameter names used by the Physical Web experimental scoring experiments.
514 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[]; 494 static const char kPhysicalWebZeroSuggestBaseRelevanceParam[];
515 static const char kPhysicalWebAfterTypingBaseRelevanceParam[]; 495 static const char kPhysicalWebAfterTypingBaseRelevanceParam[];
516 496
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. 497 // Parameter names used by UI experiments.
523 static const char kUIMaxAutocompleteMatchesParam[]; 498 static const char kUIMaxAutocompleteMatchesParam[];
524 static const char kUIVerticalMarginParam[]; 499 static const char kUIVerticalMarginParam[];
525 500
526 // The amount of time to wait before sending a new suggest request after the 501 // The amount of time to wait before sending a new suggest request after the
527 // previous one unless overridden by a field trial parameter. 502 // previous one unless overridden by a field trial parameter.
528 // Non-const because some unittests modify this value. 503 // Non-const because some unittests modify this value.
529 static int kDefaultMinimumTimeBetweenSuggestQueriesMs; 504 static int kDefaultMinimumTimeBetweenSuggestQueriesMs;
530 505
531 private: 506 private:
(...skipping 15 matching lines...) Expand all
547 // prioritize different wildcard contexts, see the implementation. How to 522 // prioritize different wildcard contexts, see the implementation. How to
548 // interpret the value is left to the caller; this is rule-dependent. 523 // interpret the value is left to the caller; this is rule-dependent.
549 static std::string GetValueForRuleInContext( 524 static std::string GetValueForRuleInContext(
550 const std::string& rule, 525 const std::string& rule,
551 metrics::OmniboxEventProto::PageClassification page_classification); 526 metrics::OmniboxEventProto::PageClassification page_classification);
552 527
553 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial); 528 DISALLOW_IMPLICIT_CONSTRUCTORS(OmniboxFieldTrial);
554 }; 529 };
555 530
556 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ 531 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698