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

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

Issue 2854263002: Omnibox UI Experiments: Add vertical margin variations to about:flags (Closed)
Patch Set: update histograms Created 3 years, 7 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
« no previous file with comments | « components/omnibox/browser/omnibox_field_trial.h ('k') | tools/metrics/histograms/enums.xml » ('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 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 #include "components/omnibox/browser/omnibox_field_trial.h" 5 #include "components/omnibox/browser/omnibox_field_trial.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Feature used to swap the title and URL when providing zero suggest 74 // Feature used to swap the title and URL when providing zero suggest
75 // suggestions. 75 // suggestions.
76 const base::Feature kZeroSuggestSwapTitleAndUrl{ 76 const base::Feature kZeroSuggestSwapTitleAndUrl{
77 "ZeroSuggestSwapTitleAndUrl", base::FEATURE_DISABLED_BY_DEFAULT}; 77 "ZeroSuggestSwapTitleAndUrl", base::FEATURE_DISABLED_BY_DEFAULT};
78 78
79 // Feature used to display the title of the current URL match. 79 // Feature used to display the title of the current URL match.
80 const base::Feature kDisplayTitleForCurrentUrl{ 80 const base::Feature kDisplayTitleForCurrentUrl{
81 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; 81 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT};
82 82
83 // Feature used for UI experiments.
84 const base::Feature kUIExperiments{"OmniboxUIExperiments",
85 base::FEATURE_DISABLED_BY_DEFAULT};
86
83 } // namespace omnibox 87 } // namespace omnibox
84 88
85 namespace { 89 namespace {
86 90
87 typedef std::map<std::string, std::string> VariationParams; 91 typedef std::map<std::string, std::string> VariationParams;
88 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; 92 typedef HUPScoringParams::ScoreBuckets ScoreBuckets;
89 93
90 // Field trial names. 94 // Field trial names.
91 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; 95 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer";
92 96
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 "PhysicalWebZeroSuggestBaseRelevance"; 733 "PhysicalWebZeroSuggestBaseRelevance";
730 const char OmniboxFieldTrial::kPhysicalWebAfterTypingBaseRelevanceParam[] = 734 const char OmniboxFieldTrial::kPhysicalWebAfterTypingBaseRelevanceParam[] =
731 "PhysicalWebAfterTypingBaseRelevanceParam"; 735 "PhysicalWebAfterTypingBaseRelevanceParam";
732 736
733 const char OmniboxFieldTrial::kZeroSuggestRedirectToChromeServerAddressParam[] = 737 const char OmniboxFieldTrial::kZeroSuggestRedirectToChromeServerAddressParam[] =
734 "ZeroSuggestRedirectToChromeServerAddress"; 738 "ZeroSuggestRedirectToChromeServerAddress";
735 const char 739 const char
736 OmniboxFieldTrial::kZeroSuggestRedirectToChromeAdditionalFieldsParam[] = 740 OmniboxFieldTrial::kZeroSuggestRedirectToChromeAdditionalFieldsParam[] =
737 "ZeroSuggestRedirectToChromeAdditionalFields"; 741 "ZeroSuggestRedirectToChromeAdditionalFields";
738 742
743 const char OmniboxFieldTrial::kUIExperimentsVerticalMarginParam[] =
744 "UIExperimentsVerticalMargin";
745
739 // static 746 // static
740 int OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs = 100; 747 int OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs = 100;
741 748
742 // Background and implementation details: 749 // Background and implementation details:
743 // 750 //
744 // Each experiment group in any field trial can come with an optional set of 751 // Each experiment group in any field trial can come with an optional set of
745 // parameters (key-value pairs). In the bundled omnibox experiment 752 // parameters (key-value pairs). In the bundled omnibox experiment
746 // (kBundledExperimentFieldTrialName), each experiment group comes with a 753 // (kBundledExperimentFieldTrialName), each experiment group comes with a
747 // list of parameters in the form: 754 // list of parameters in the form:
748 // key=<Rule>: 755 // key=<Rule>:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 if (it != params.end()) 801 if (it != params.end())
795 return it->second; 802 return it->second;
796 // Fall back to the global instant extended context. 803 // Fall back to the global instant extended context.
797 it = params.find(rule + ":" + page_classification_str + ":*"); 804 it = params.find(rule + ":" + page_classification_str + ":*");
798 if (it != params.end()) 805 if (it != params.end())
799 return it->second; 806 return it->second;
800 // Look up rule in the global context. 807 // Look up rule in the global context.
801 it = params.find(rule + ":*:*"); 808 it = params.find(rule + ":*:*");
802 return (it != params.end()) ? it->second : std::string(); 809 return (it != params.end()) ? it->second : std::string();
803 } 810 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/omnibox_field_trial.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698