| 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 19 matching lines...) Expand all Loading... |
| 30 namespace omnibox { | 30 namespace omnibox { |
| 31 | 31 |
| 32 // Feature used to enable the new set of answers in suggest types (currency, | 32 // Feature used to enable the new set of answers in suggest types (currency, |
| 33 // dictionary, sports, translation, when is). Note that the state of this | 33 // dictionary, sports, translation, when is). Note that the state of this |
| 34 // Feature is not consulted anywhere in the code. It is only used to force a | 34 // Feature is not consulted anywhere in the code. It is only used to force a |
| 35 // Finch experiment arm which sends an experiment ID to GWS which triggers | 35 // Finch experiment arm which sends an experiment ID to GWS which triggers |
| 36 // serving the new types. | 36 // serving the new types. |
| 37 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes", | 37 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes", |
| 38 base::FEATURE_DISABLED_BY_DEFAULT}; | 38 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 39 | 39 |
| 40 // Feature used to enable clipboard provider, which provides the user with |
| 41 // suggestions of the URL in the user's clipboard (if any) upon omnibox focus. |
| 42 const base::Feature kEnableClipboardProvider { |
| 43 "OmniboxEnableClipboardProvider", |
| 44 #if defined(OS_IOS) |
| 45 base::FEATURE_ENABLED_BY_DEFAULT |
| 46 #else |
| 47 base::FEATURE_DISABLED_BY_DEFAULT |
| 48 #endif |
| 49 }; |
| 50 |
| 40 } // namespace omnibox | 51 } // namespace omnibox |
| 41 | 52 |
| 42 namespace { | 53 namespace { |
| 43 | 54 |
| 44 typedef std::map<std::string, std::string> VariationParams; | 55 typedef std::map<std::string, std::string> VariationParams; |
| 45 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; | 56 typedef HUPScoringParams::ScoreBuckets ScoreBuckets; |
| 46 | 57 |
| 47 // Field trial names. | 58 // Field trial names. |
| 48 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; | 59 const char kStopTimerFieldTrialName[] = "OmniboxStopTimer"; |
| 49 | 60 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 if (it != params.end()) | 757 if (it != params.end()) |
| 747 return it->second; | 758 return it->second; |
| 748 // Fall back to the global instant extended context. | 759 // Fall back to the global instant extended context. |
| 749 it = params.find(rule + ":" + page_classification_str + ":*"); | 760 it = params.find(rule + ":" + page_classification_str + ":*"); |
| 750 if (it != params.end()) | 761 if (it != params.end()) |
| 751 return it->second; | 762 return it->second; |
| 752 // Look up rule in the global context. | 763 // Look up rule in the global context. |
| 753 it = params.find(rule + ":*:*"); | 764 it = params.find(rule + ":*:*"); |
| 754 return (it != params.end()) ? it->second : std::string(); | 765 return (it != params.end()) ? it->second : std::string(); |
| 755 } | 766 } |
| OLD | NEW |