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

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

Issue 2071713002: Add a PhysicalWebIgnoreOtherClients feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Store setting in onChromeStart Created 4 years, 5 months 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') | no next file » | 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 20 matching lines...) Expand all
31 &features::kSimplifiedFullscreenUI, 31 &features::kSimplifiedFullscreenUI,
32 &kAndroidPayIntegrationV1, 32 &kAndroidPayIntegrationV1,
33 &kImportantSitesInCBD, 33 &kImportantSitesInCBD,
34 &kMediaStyleNotification, 34 &kMediaStyleNotification,
35 &kNTPFakeOmniboxTextFeature, 35 &kNTPFakeOmniboxTextFeature,
36 &kNTPMaterialDesign, 36 &kNTPMaterialDesign,
37 &kNTPOfflinePagesFeature, 37 &kNTPOfflinePagesFeature,
38 &kNTPSnippetsFeature, 38 &kNTPSnippetsFeature,
39 &kNTPToolbarFeature, 39 &kNTPToolbarFeature,
40 &kPhysicalWebFeature, 40 &kPhysicalWebFeature,
41 &kPhysicalWebIgnoreOtherClientsFeature,
41 &kReadItLaterInMenu, 42 &kReadItLaterInMenu,
42 &kSystemDownloadManager, 43 &kSystemDownloadManager,
43 &offline_pages::kOfflinePagesBackgroundLoadingFeature, 44 &offline_pages::kOfflinePagesBackgroundLoadingFeature,
44 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. 45 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421.
45 }; 46 };
46 47
47 } // namespace 48 } // namespace
48 49
49 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", 50 const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD",
50 base::FEATURE_DISABLED_BY_DEFAULT}; 51 base::FEATURE_DISABLED_BY_DEFAULT};
(...skipping 22 matching lines...) Expand all
73 }; 74 };
74 75
75 const base::Feature kAndroidPayIntegrationV1 { 76 const base::Feature kAndroidPayIntegrationV1 {
76 "AndroidPayIntegrationV1", base::FEATURE_ENABLED_BY_DEFAULT 77 "AndroidPayIntegrationV1", base::FEATURE_ENABLED_BY_DEFAULT
77 }; 78 };
78 79
79 const base::Feature kPhysicalWebFeature { 80 const base::Feature kPhysicalWebFeature {
80 "PhysicalWeb", base::FEATURE_ENABLED_BY_DEFAULT 81 "PhysicalWeb", base::FEATURE_ENABLED_BY_DEFAULT
81 }; 82 };
82 83
84 const base::Feature kPhysicalWebIgnoreOtherClientsFeature {
85 "PhysicalWebIgnoreOtherClients", base::FEATURE_DISABLED_BY_DEFAULT
86 };
87
83 const base::Feature kReadItLaterInMenu { 88 const base::Feature kReadItLaterInMenu {
84 "ReadItLaterInMenu", base::FEATURE_DISABLED_BY_DEFAULT 89 "ReadItLaterInMenu", base::FEATURE_DISABLED_BY_DEFAULT
85 }; 90 };
86 91
87 const base::Feature kSystemDownloadManager { 92 const base::Feature kSystemDownloadManager {
88 "SystemDownloadManager", base::FEATURE_ENABLED_BY_DEFAULT 93 "SystemDownloadManager", base::FEATURE_ENABLED_BY_DEFAULT
89 }; 94 };
90 95
91 static jboolean IsEnabled(JNIEnv* env, 96 static jboolean IsEnabled(JNIEnv* env,
92 const JavaParamRef<jclass>& clazz, 97 const JavaParamRef<jclass>& clazz,
93 const JavaParamRef<jstring>& jfeature_name) { 98 const JavaParamRef<jstring>& jfeature_name) {
94 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); 99 const std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name);
95 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { 100 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) {
96 if (kFeaturesExposedToJava[i]->name == feature_name) 101 if (kFeaturesExposedToJava[i]->name == feature_name)
97 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]); 102 return base::FeatureList::IsEnabled(*kFeaturesExposedToJava[i]);
98 } 103 }
99 // Features queried via this API must be present in |kFeaturesExposedToJava|. 104 // Features queried via this API must be present in |kFeaturesExposedToJava|.
100 NOTREACHED(); 105 NOTREACHED();
101 return false; 106 return false;
102 } 107 }
103 108
104 bool RegisterChromeFeatureListJni(JNIEnv* env) { 109 bool RegisterChromeFeatureListJni(JNIEnv* env) {
105 return RegisterNativesImpl(env); 110 return RegisterNativesImpl(env);
106 } 111 }
107 112
108 } // namespace android 113 } // namespace android
109 } // namespace chrome 114 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_feature_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698