Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 | 84 |
| 85 // Feature used to display the title of the current URL match. | 85 // Feature used to display the title of the current URL match. |
| 86 const base::Feature kDisplayTitleForCurrentUrl{ | 86 const base::Feature kDisplayTitleForCurrentUrl{ |
| 87 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; | 87 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 88 | 88 |
| 89 // Feature used for the max autocomplete matches UI experiment. | 89 // Feature used for the max autocomplete matches UI experiment. |
| 90 const base::Feature kUIExperimentMaxAutocompleteMatches{ | 90 const base::Feature kUIExperimentMaxAutocompleteMatches{ |
| 91 "OmniboxUIExperimentMaxAutocompleteMatches", | 91 "OmniboxUIExperimentMaxAutocompleteMatches", |
| 92 base::FEATURE_DISABLED_BY_DEFAULT}; | 92 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 93 | 93 |
| 94 // Feature used for hiding the suggestion URL path as a UI experiment. | |
| 95 const base::Feature kUIExperimentHideSuggestionUrlPath{ | |
| 96 "OmniboxUIExperimentHideSuggestionUrlPath", | |
| 97 base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 98 | |
| 99 // Feature used for hiding the suggestion URL protocol as a UI experiment. | |
| 100 const base::Feature kUIExperimentHideSuggestionUrlProtocol{ | |
| 101 "OmniboxUIExperimentHideSuggestionUrlProtocol", | |
| 102 base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 103 | |
| 104 // Feature used for hiding the suggestion URL subdomain as a UI experiment. | |
| 105 // This only hides some special non-informative subdomains such as "www" or "m". | |
|
Justin Donnelly
2017/06/13 20:58:12
And then s/non-/trivially/ here.
tommycli
2017/06/13 21:47:09
Done.
| |
| 106 const base::Feature kUIExperimentHideSuggestionUrlSubdomain{ | |
| 107 "OmniboxUIExperimentHideSuggestionUrlSubdomain", | |
| 108 base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 109 | |
| 94 // Feature used for the omnibox narrow suggestions dropdown UI experiment. | 110 // Feature used for the omnibox narrow suggestions dropdown UI experiment. |
| 95 const base::Feature kUIExperimentNarrowDropdown{ | 111 const base::Feature kUIExperimentNarrowDropdown{ |
| 96 "OmniboxUIExperimentNarrowDropdown", base::FEATURE_DISABLED_BY_DEFAULT}; | 112 "OmniboxUIExperimentNarrowDropdown", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 97 | 113 |
| 98 // Feature used for the vertical margin UI experiment. | 114 // Feature used for the vertical margin UI experiment. |
| 99 const base::Feature kUIExperimentVerticalLayout{ | 115 const base::Feature kUIExperimentVerticalLayout{ |
| 100 "OmniboxUIExperimentVerticalLayout", base::FEATURE_DISABLED_BY_DEFAULT}; | 116 "OmniboxUIExperimentVerticalLayout", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 101 | 117 |
| 102 // Feature used for the vertical margin UI experiment. | 118 // Feature used for the vertical margin UI experiment. |
| 103 const base::Feature kUIExperimentVerticalMargin{ | 119 const base::Feature kUIExperimentVerticalMargin{ |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 841 if (it != params.end()) | 857 if (it != params.end()) |
| 842 return it->second; | 858 return it->second; |
| 843 // Fall back to the global instant extended context. | 859 // Fall back to the global instant extended context. |
| 844 it = params.find(rule + ":" + page_classification_str + ":*"); | 860 it = params.find(rule + ":" + page_classification_str + ":*"); |
| 845 if (it != params.end()) | 861 if (it != params.end()) |
| 846 return it->second; | 862 return it->second; |
| 847 // Look up rule in the global context. | 863 // Look up rule in the global context. |
| 848 it = params.find(rule + ":*:*"); | 864 it = params.find(rule + ":*:*"); |
| 849 return (it != params.end()) ? it->second : std::string(); | 865 return (it != params.end()) ? it->second : std::string(); |
| 850 } | 866 } |
| OLD | NEW |