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

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

Issue 2961393002: Omnibox UI Experiments: Hook up elide-after-host feature flag. (Closed)
Patch Set: merge 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
« 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // Feature used to display the title of the current URL match. 97 // Feature used to display the title of the current URL match.
98 const base::Feature kDisplayTitleForCurrentUrl{ 98 const base::Feature kDisplayTitleForCurrentUrl{
99 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; 99 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT};
100 100
101 // Feature used for the max autocomplete matches UI experiment. 101 // Feature used for the max autocomplete matches UI experiment.
102 const base::Feature kUIExperimentMaxAutocompleteMatches{ 102 const base::Feature kUIExperimentMaxAutocompleteMatches{
103 "OmniboxUIExperimentMaxAutocompleteMatches", 103 "OmniboxUIExperimentMaxAutocompleteMatches",
104 base::FEATURE_DISABLED_BY_DEFAULT}; 104 base::FEATURE_DISABLED_BY_DEFAULT};
105 105
106 // Feature used for hiding the suggestion URL path as a UI experiment. 106 // Feature used for eliding the suggestion URL after the host as a UI
107 const base::Feature kUIExperimentHideSuggestionUrlPath{ 107 // experiment.
108 "OmniboxUIExperimentHideSuggestionUrlPath", 108 const base::Feature kUIExperimentElideSuggestionUrlAfterHost{
109 "OmniboxUIExperimentElideSuggestionUrlAfterHost",
109 base::FEATURE_DISABLED_BY_DEFAULT}; 110 base::FEATURE_DISABLED_BY_DEFAULT};
110 111
111 // Feature used for hiding the suggestion URL scheme as a UI experiment. 112 // Feature used for hiding the suggestion URL scheme as a UI experiment.
112 const base::Feature kUIExperimentHideSuggestionUrlScheme{ 113 const base::Feature kUIExperimentHideSuggestionUrlScheme{
113 "OmniboxUIExperimentHideSuggestionUrlScheme", 114 "OmniboxUIExperimentHideSuggestionUrlScheme",
114 base::FEATURE_DISABLED_BY_DEFAULT}; 115 base::FEATURE_DISABLED_BY_DEFAULT};
115 116
116 // Feature used for hiding the suggestion URL subdomain as a UI experiment. 117 // Feature used for hiding the suggestion URL subdomain as a UI experiment.
117 // This only hides some trivially informative subdomains such as "www" or "m". 118 // This only hides some trivially informative subdomains such as "www" or "m".
118 const base::Feature kUIExperimentHideSuggestionUrlTrivialSubdomains{ 119 const base::Feature kUIExperimentHideSuggestionUrlTrivialSubdomains{
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 if (it != params.end()) 870 if (it != params.end())
870 return it->second; 871 return it->second;
871 // Fall back to the global instant extended context. 872 // Fall back to the global instant extended context.
872 it = params.find(rule + ":" + page_classification_str + ":*"); 873 it = params.find(rule + ":" + page_classification_str + ":*");
873 if (it != params.end()) 874 if (it != params.end())
874 return it->second; 875 return it->second;
875 // Look up rule in the global context. 876 // Look up rule in the global context.
876 it = params.find(rule + ":*:*"); 877 it = params.find(rule + ":*:*");
877 return (it != params.end()) ? it->second : std::string(); 878 return (it != params.end()) ? it->second : std::string();
878 } 879 }
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