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 25 matching lines...) Expand all Loading... | |
36 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes", | 36 const base::Feature kNewOmniboxAnswerTypes{"NewOmniboxAnswerTypes", |
37 base::FEATURE_DISABLED_BY_DEFAULT}; | 37 base::FEATURE_DISABLED_BY_DEFAULT}; |
38 | 38 |
39 // Feature used to enable the transmission of entity suggestions from GWS | 39 // Feature used to enable the transmission of entity suggestions from GWS |
40 // to this client. | 40 // to this client. |
41 const base::Feature kOmniboxEntitySuggestions{ | 41 const base::Feature kOmniboxEntitySuggestions{ |
42 "OmniboxEntitySuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; | 42 "OmniboxEntitySuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; |
43 | 43 |
44 // Feature used to enable clipboard provider, which provides the user with | 44 // Feature used to enable clipboard provider, which provides the user with |
45 // suggestions of the URL in the user's clipboard (if any) upon omnibox focus. | 45 // suggestions of the URL in the user's clipboard (if any) upon omnibox focus. |
46 const base::Feature kEnableClipboardProvider { | 46 const base::Feature kEnableClipboardProvider{ |
47 "OmniboxEnableClipboardProvider", | 47 "OmniboxEnableClipboardProvider", |
48 #if defined(OS_IOS) | 48 // #if defined(OS_IOS) |
49 base::FEATURE_ENABLED_BY_DEFAULT | 49 base::FEATURE_ENABLED_BY_DEFAULT |
50 #else | 50 //#else |
51 base::FEATURE_DISABLED_BY_DEFAULT | 51 // base::FEATURE_DISABLED_BY_DEFAULT |
52 #endif | 52 //#endif |
dcheng
2017/04/02 05:04:03
Nit: remove the commented-out code
Mark P
2017/04/02 05:33:56
Acknowledged. It's a TODO in the changelist descr
| |
53 }; | 53 }; |
54 | 54 |
55 // Feature to enable the search provider to send a request to the suggest | 55 // Feature to enable the search provider to send a request to the suggest |
56 // server on focus. This allows the suggest server to warm up, by, for | 56 // server on focus. This allows the suggest server to warm up, by, for |
57 // example, loading per-user models into memory. Having a per-user model | 57 // example, loading per-user models into memory. Having a per-user model |
58 // in memory allows the suggest server to respond more quickly with | 58 // in memory allows the suggest server to respond more quickly with |
59 // personalized suggestions as the user types. | 59 // personalized suggestions as the user types. |
60 const base::Feature kSearchProviderWarmUpOnFocus{ | 60 const base::Feature kSearchProviderWarmUpOnFocus{ |
61 "OmniboxWarmUpSearchProviderOnFocus", base::FEATURE_DISABLED_BY_DEFAULT}; | 61 "OmniboxWarmUpSearchProviderOnFocus", base::FEATURE_DISABLED_BY_DEFAULT}; |
62 | 62 |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 if (it != params.end()) | 790 if (it != params.end()) |
791 return it->second; | 791 return it->second; |
792 // Fall back to the global instant extended context. | 792 // Fall back to the global instant extended context. |
793 it = params.find(rule + ":" + page_classification_str + ":*"); | 793 it = params.find(rule + ":" + page_classification_str + ":*"); |
794 if (it != params.end()) | 794 if (it != params.end()) |
795 return it->second; | 795 return it->second; |
796 // Look up rule in the global context. | 796 // Look up rule in the global context. |
797 it = params.find(rule + ":*:*"); | 797 it = params.find(rule + ":*:*"); |
798 return (it != params.end()) ? it->second : std::string(); | 798 return (it != params.end()) ? it->second : std::string(); |
799 } | 799 } |
OLD | NEW |