Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/android/chrome_feature_list.cc

Issue 2544973002: Make chrome://flags control whether the WebAPK feature is on (Closed)
Patch Set: Merge branch 'master' into feature_on_default Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/chrome_feature_list.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
38 &features::kSimplifiedFullscreenUI, 38 &features::kSimplifiedFullscreenUI,
39 &features::kVrShell, 39 &features::kVrShell,
40 &features::kWebPayments, 40 &features::kWebPayments,
41 &kAndroidPayIntegrationV1, 41 &kAndroidPayIntegrationV1,
42 &kCCTExternalLinkHandling, 42 &kCCTExternalLinkHandling,
43 &kCCTPostMessageAPI, 43 &kCCTPostMessageAPI,
44 &kChromeHomeFeature, 44 &kChromeHomeFeature,
45 &kContextualSearchSingleActions, 45 &kContextualSearchSingleActions,
46 &kDownloadsUiFeature, 46 &kDownloadsUiFeature,
47 &kImportantSitesInCBD, 47 &kImportantSitesInCBD,
48 &kImprovedA2HS,
48 &kNoCreditCardAbort, 49 &kNoCreditCardAbort,
49 &kNTPFakeOmniboxTextFeature, 50 &kNTPFakeOmniboxTextFeature,
50 &kNTPOfflinePagesFeature, 51 &kNTPOfflinePagesFeature,
51 &kPhysicalWebFeature, 52 &kPhysicalWebFeature,
52 &kPhysicalWebIgnoreOtherClientsFeature, 53 &kPhysicalWebIgnoreOtherClientsFeature,
53 &kSpecialLocaleFeature, 54 &kSpecialLocaleFeature,
54 &kSpecialLocaleWrapper, 55 &kSpecialLocaleWrapper,
55 &kTabReparenting, 56 &kTabReparenting,
56 &kWebApks,
57 &kWebPaymentsModifiers, 57 &kWebPaymentsModifiers,
58 &ntp_snippets::kContentSuggestionsFeature, 58 &ntp_snippets::kContentSuggestionsFeature,
59 &ntp_snippets::kIncreasedVisibility, 59 &ntp_snippets::kIncreasedVisibility,
60 &ntp_snippets::kForeignSessionsSuggestionsFeature, 60 &ntp_snippets::kForeignSessionsSuggestionsFeature,
61 &ntp_snippets::kOfflineBadgeFeature, 61 &ntp_snippets::kOfflineBadgeFeature,
62 &ntp_snippets::kSaveToOfflineFeature, 62 &ntp_snippets::kSaveToOfflineFeature,
63 &ntp_snippets::kSectionDismissalFeature, 63 &ntp_snippets::kSectionDismissalFeature,
64 &offline_pages::kBackgroundLoaderForDownloadsFeature, 64 &offline_pages::kBackgroundLoaderForDownloadsFeature,
65 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. 65 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421.
66 &offline_pages::kOfflinePagesSharingFeature, 66 &offline_pages::kOfflinePagesSharingFeature,
(...skipping 17 matching lines...) Expand all
84 84
85 const base::Feature kContextualSearchSingleActions{ 85 const base::Feature kContextualSearchSingleActions{
86 "ContextualSearchSingleActions", base::FEATURE_DISABLED_BY_DEFAULT}; 86 "ContextualSearchSingleActions", base::FEATURE_DISABLED_BY_DEFAULT};
87 87
88 const base::Feature kDownloadsUiFeature{"DownloadsUi", 88 const base::Feature kDownloadsUiFeature{"DownloadsUi",
89 base::FEATURE_DISABLED_BY_DEFAULT}; 89 base::FEATURE_DISABLED_BY_DEFAULT};
90 90
91 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", 91 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD",
92 base::FEATURE_DISABLED_BY_DEFAULT}; 92 base::FEATURE_DISABLED_BY_DEFAULT};
93 93
94 // Makes "Add to Home screen" in the app menu generate an APK for the shortcut
95 // URL which opens Chrome in fullscreen.
96 const base::Feature kImprovedA2HS{"ImprovedA2HS",
97 base::FEATURE_DISABLED_BY_DEFAULT};
98
94 const base::Feature kNoCreditCardAbort{"NoCreditCardAbort", 99 const base::Feature kNoCreditCardAbort{"NoCreditCardAbort",
95 base::FEATURE_DISABLED_BY_DEFAULT}; 100 base::FEATURE_DISABLED_BY_DEFAULT};
96 101
97 const base::Feature kNTPFakeOmniboxTextFeature{ 102 const base::Feature kNTPFakeOmniboxTextFeature{
98 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT}; 103 "NTPFakeOmniboxText", base::FEATURE_DISABLED_BY_DEFAULT};
99 104
100 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages", 105 const base::Feature kNTPOfflinePagesFeature{"NTPOfflinePages",
101 base::FEATURE_ENABLED_BY_DEFAULT}; 106 base::FEATURE_ENABLED_BY_DEFAULT};
102 107
103 const base::Feature kPhysicalWebFeature{"PhysicalWeb", 108 const base::Feature kPhysicalWebFeature{"PhysicalWeb",
104 base::FEATURE_ENABLED_BY_DEFAULT}; 109 base::FEATURE_ENABLED_BY_DEFAULT};
105 110
106 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{ 111 const base::Feature kPhysicalWebIgnoreOtherClientsFeature{
107 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT}; 112 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT};
108 113
109 const base::Feature kSpecialLocaleFeature{"SpecialLocale", 114 const base::Feature kSpecialLocaleFeature{"SpecialLocale",
110 base::FEATURE_DISABLED_BY_DEFAULT}; 115 base::FEATURE_DISABLED_BY_DEFAULT};
111 116
112 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper", 117 const base::Feature kSpecialLocaleWrapper{"SpecialLocaleWrapper",
113 base::FEATURE_ENABLED_BY_DEFAULT}; 118 base::FEATURE_ENABLED_BY_DEFAULT};
114 119
115 const base::Feature kTabReparenting{"TabReparenting", 120 const base::Feature kTabReparenting{"TabReparenting",
116 base::FEATURE_ENABLED_BY_DEFAULT}; 121 base::FEATURE_ENABLED_BY_DEFAULT};
117 122
118 const base::Feature kUserMediaScreenCapturing{ 123 const base::Feature kUserMediaScreenCapturing{
119 "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; 124 "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT};
120 125
121 // Makes "Add to Home screen" in the app menu generate an APK for the shortcut
122 // URL which opens Chrome in fullscreen.
123 const base::Feature kWebApks{"WebApks", base::FEATURE_DISABLED_BY_DEFAULT};
124
125 const base::Feature kWebPaymentsModifiers{"WebPaymentsModifiers", 126 const base::Feature kWebPaymentsModifiers{"WebPaymentsModifiers",
126 base::FEATURE_DISABLED_BY_DEFAULT}; 127 base::FEATURE_DISABLED_BY_DEFAULT};
127 128
128 static jboolean IsEnabled(JNIEnv* env, 129 static jboolean IsEnabled(JNIEnv* env,
129 const JavaParamRef<jclass>& clazz, 130 const JavaParamRef<jclass>& clazz,
130 const JavaParamRef<jstring>& jfeature_name) { 131 const JavaParamRef<jstring>& jfeature_name) {
131 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); 132 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name);
132 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { 133 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) {
133 if (kFeaturesExposedToJava[i]->name == feature_name) 134 if (kFeaturesExposedToJava[i]->name == feature_name)
134 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); 135 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]);
135 } 136 }
136 // Features queried via this API must be present in |kFeaturesExposedToJava|. 137 // Features queried via this API must be present in |kFeaturesExposedToJava|.
137 NOTREACHED(); 138 NOTREACHED();
138 return false; 139 return false;
139 } 140 }
140 141
141 bool RegisterChromeFeatureListJni(JNIEnv* env) { 142 bool RegisterChromeFeatureListJni(JNIEnv* env) {
142 return RegisterNativesImpl(env); 143 return RegisterNativesImpl(env);
143 } 144 }
144 145
145 } // namespace android 146 } // namespace android
146 } // namespace chrome 147 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_feature_list.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698