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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Feature used for the Zero Suggest Redirect to Chrome Field Trial. | 70 // Feature used for the Zero Suggest Redirect to Chrome Field Trial. |
71 const base::Feature kZeroSuggestRedirectToChrome{ | 71 const base::Feature kZeroSuggestRedirectToChrome{ |
72 "ZeroSuggestRedirectToChrome", base::FEATURE_DISABLED_BY_DEFAULT}; | 72 "ZeroSuggestRedirectToChrome", base::FEATURE_DISABLED_BY_DEFAULT}; |
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. |
| 80 const base::Feature kDisplayTitleForCurrentUrl{ |
| 81 "OmniboxDisplayTitleForCurrentUrl", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 82 |
79 } // namespace omnibox | 83 } // namespace omnibox |
80 | 84 |
81 namespace { | 85 namespace { |
82 | 86 |
83 typedef std::map<std::string, std::string> VariationParams; | 87 typedef std::map<std::string, std::string> VariationParams; |
84 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; | 88 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; |
85 | 89 |
86 // Field trial names. | 90 // Field trial names. |
87 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; | 91 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; |
88 | 92 |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 if (it != params.end()) | 794 if (it != params.end()) |
791 return it->second; | 795 return it->second; |
792 // Fall back to the global instant extended context. | 796 // Fall back to the global instant extended context. |
793 it = params.find(rule + ":" + page_classification_str + ":*"); | 797 it = params.find(rule + ":" + page_classification_str + ":*"); |
794 if (it != params.end()) | 798 if (it != params.end()) |
795 return it->second; | 799 return it->second; |
796 // Look up rule in the global context. | 800 // Look up rule in the global context. |
797 it = params.find(rule + ":*:*"); | 801 it = params.find(rule + ":*:*"); |
798 return (it != params.end()) ? it->second : std::string(); | 802 return (it != params.end()) ? it->second : std::string(); |
799 } | 803 } |
OLD | NEW |