Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/android/chrome_feature_list.h" | 5 #include "chrome/browser/android/chrome_feature_list.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 &kImportantSitesInCBD, | 46 &kImportantSitesInCBD, |
| 47 &kNoCreditCardAbort, | 47 &kNoCreditCardAbort, |
| 48 &kNTPFakeOmniboxTextFeature, | 48 &kNTPFakeOmniboxTextFeature, |
| 49 &kNTPOfflinePagesFeature, | 49 &kNTPOfflinePagesFeature, |
| 50 &kPhysicalWebFeature, | 50 &kPhysicalWebFeature, |
| 51 &kPhysicalWebIgnoreOtherClientsFeature, | 51 &kPhysicalWebIgnoreOtherClientsFeature, |
| 52 &kSpecialLocaleFeature, | 52 &kSpecialLocaleFeature, |
| 53 &kSpecialLocaleWrapper, | 53 &kSpecialLocaleWrapper, |
| 54 &kTabReparenting, | 54 &kTabReparenting, |
| 55 &kWebApks, | 55 &kWebApks, |
| 56 &kWebPaymentsModifiers, | |
| 56 &ntp_snippets::kContentSuggestionsFeature, | 57 &ntp_snippets::kContentSuggestionsFeature, |
| 57 &ntp_snippets::kIncreasedVisibility, | 58 &ntp_snippets::kIncreasedVisibility, |
| 58 &ntp_snippets::kForeignSessionsSuggestionsFeature, | 59 &ntp_snippets::kForeignSessionsSuggestionsFeature, |
| 59 &ntp_snippets::kOfflineBadgeFeature, | 60 &ntp_snippets::kOfflineBadgeFeature, |
| 60 &ntp_snippets::kSaveToOfflineFeature, | 61 &ntp_snippets::kSaveToOfflineFeature, |
| 61 &ntp_snippets::kSectionDismissalFeature, | 62 &ntp_snippets::kSectionDismissalFeature, |
| 62 &offline_pages::kBackgroundLoaderForDownloadsFeature, | 63 &offline_pages::kBackgroundLoaderForDownloadsFeature, |
| 63 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. | 64 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. |
| 64 &offline_pages::kOfflinePagesSharingFeature, | 65 &offline_pages::kOfflinePagesSharingFeature, |
| 65 &password_manager::features::kViewPasswords, | 66 &password_manager::features::kViewPasswords, |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 85 | 86 |
| 86 const base::Feature kDownloadsUiFeature{"DownloadsUi", | 87 const base::Feature kDownloadsUiFeature{"DownloadsUi", |
| 87 base::FEATURE_DISABLED_BY_DEFAULT}; | 88 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 88 | 89 |
| 89 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", | 90 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", |
| 90 base::FEATURE_DISABLED_BY_DEFAULT}; | 91 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 91 | 92 |
| 92 const base::Feature kNoCreditCardAbort{"NoCreditCardAbort", | 93 const base::Feature kNoCreditCardAbort{"NoCreditCardAbort", |
| 93 base::FEATURE_DISABLED_BY_DEFAULT}; | 94 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 94 | 95 |
| 96 const base::Feature kNTPFakeOmniboxTextFeature{ | |
| 97 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 98 | |
| 95 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages", | 99 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages", |
| 96 base::FEATURE_ENABLED_BY_DEFAULT}; | 100 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 97 | 101 |
| 98 const base::Feature kNTPFakeOmniboxTextFeature{ | |
| 99 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT}; | |
| 100 | |
| 101 const base::Feature kPhysicalWebFeature{"PhysicalWeb", | 102 const base::Feature kPhysicalWebFeature{"PhysicalWeb", |
| 102 base::FEATURE_ENABLED_BY_DEFAULT}; | 103 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 103 | 104 |
| 104 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{ | 105 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{ |
| 105 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT}; | 106 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 106 | 107 |
| 107 const base::Feature kSpecialLocaleFeature{"SpecialLocale", | 108 const base::Feature kSpecialLocaleFeature{"SpecialLocale", |
| 108 base::FEATURE_DISABLED_BY_DEFAULT}; | 109 base::FEATURE_DISABLED_BY_DEFAULT}; |
| 109 | 110 |
| 110 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper", | 111 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper", |
| 111 base::FEATURE_ENABLED_BY_DEFAULT}; | 112 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 112 | 113 |
| 113 const base::Feature kTabReparenting{"TabReparenting", | 114 const base::Feature kTabReparenting{"TabReparenting", |
| 114 base::FEATURE_ENABLED_BY_DEFAULT}; | 115 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 115 | 116 |
| 116 const base::Feature kUserMediaScreenCapturing{ | 117 const base::Feature kUserMediaScreenCapturing{ |
| 117 "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; | 118 "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 118 | 119 |
| 119 // Makes "Add to Home screen" in the app menu generate an APK for the shortcut | 120 // Makes "Add to Home screen" in the app menu generate an APK for the shortcut |
| 120 // URL which opens Chrome in fullscreen. | 121 // URL which opens Chrome in fullscreen. |
| 121 const base::Feature kWebApks{"WebApks", base::FEATURE_DISABLED_BY_DEFAULT}; | 122 const base::Feature kWebApks{"WebApks", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 122 | 123 |
| 124 const base::Feature kWebPaymentsModifiers{"WebPaymentsModifiers", | |
| 125 base::FEATURE_DISABLED_BY_DEFAULT}; | |
|
Ian Wen
2016/11/30 22:16:22
Q: Do you plan to roll this feature out using vari
please use gerrit instead
2016/12/01 20:26:51
No.
| |
| 126 | |
| 123 static jboolean IsEnabled(JNIEnv* env, | 127 static jboolean IsEnabled(JNIEnv* env, |
| 124 const JavaParamRef<jclass>& clazz, | 128 const JavaParamRef<jclass>& clazz, |
| 125 const JavaParamRef<jstring>& jfeature_name) { | 129 const JavaParamRef<jstring>& jfeature_name) { |
| 126 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); | 130 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); |
| 127 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { | 131 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { |
| 128 if (kFeaturesExposedToJava[i]->name == feature_name) | 132 if (kFeaturesExposedToJava[i]->name == feature_name) |
| 129 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); | 133 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); |
| 130 } | 134 } |
| 131 // Features queried via this API must be present in |kFeaturesExposedToJava|. | 135 // Features queried via this API must be present in |kFeaturesExposedToJava|. |
| 132 NOTREACHED(); | 136 NOTREACHED(); |
| 133 return false; | 137 return false; |
| 134 } | 138 } |
| 135 | 139 |
| 136 bool RegisterChromeFeatureListJni(JNIEnv* env) { | 140 bool RegisterChromeFeatureListJni(JNIEnv* env) { |
| 137 return RegisterNativesImpl(env); | 141 return RegisterNativesImpl(env); |
| 138 } | 142 } |
| 139 | 143 |
| 140 } // namespace android | 144 } // namespace android |
| 141 } // namespace chrome | 145 } // namespace chrome |
| OLD | NEW |