| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Feature used to display the title of the current URL match. | 80 // Feature used to display the title of the current URL match. |
| 81 const base::Feature kDisplayTitleForCurrentUrl{ | 81 const base::Feature kDisplayTitleForCurrentUrl{ |
| 82 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; | 82 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 83 | 83 |
| 84 // Feature used for the max autocomplete matches UI experiment. | 84 // Feature used for the max autocomplete matches UI experiment. |
| 85 const base::Feature kUIExperimentMaxAutocompleteMatches{ | 85 const base::Feature kUIExperimentMaxAutocompleteMatches{ |
| 86 "OmniboxUIExperimentMaxAutocompleteMatches", | 86 "OmniboxUIExperimentMaxAutocompleteMatches", |
| 87 base::FEATURE_DISABLED_BY_DEFAULT}; | 87 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 88 | 88 |
| 89 // Feature used for the vertical margin UI experiment. | 89 // Feature used for the vertical margin UI experiment. |
| 90 const base::Feature kUIExperimentVerticalLayout{ |
| 91 "OmniboxUIExperimentVerticalLayout", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 92 |
| 93 // Feature used for the vertical margin UI experiment. |
| 90 const base::Feature kUIExperimentVerticalMargin{ | 94 const base::Feature kUIExperimentVerticalMargin{ |
| 91 "OmniboxUIExperimentVerticalMargin", base::FEATURE_DISABLED_BY_DEFAULT}; | 95 "OmniboxUIExperimentVerticalMargin", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 92 | 96 |
| 93 } // namespace omnibox | 97 } // namespace omnibox |
| 94 | 98 |
| 95 namespace { | 99 namespace { |
| 96 | 100 |
| 97 typedef std::map<std::string, std::string> VariationParams; | 101 typedef std::map<std::string, std::string> VariationParams; |
| 98 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; | 102 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; |
| 99 | 103 |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 if (it != params.end()) | 832 if (it != params.end()) |
| 829 return it->second; | 833 return it->second; |
| 830 // Fall back to the global instant extended context. | 834 // Fall back to the global instant extended context. |
| 831 it = params.find(rule + ":" + page_classification_str + ":*"); | 835 it = params.find(rule + ":" + page_classification_str + ":*"); |
| 832 if (it != params.end()) | 836 if (it != params.end()) |
| 833 return it->second; | 837 return it->second; |
| 834 // Look up rule in the global context. | 838 // Look up rule in the global context. |
| 835 it = params.find(rule + ":*:*"); | 839 it = params.find(rule + ":*:*"); |
| 836 return (it != params.end()) ? it->second : std::string(); | 840 return (it != params.end()) ? it->second : std::string(); |
| 837 } | 841 } |
| OLD | NEW |