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

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

Issue 2785913002: [subresource_filter] Add the Content Settings UI for Android (Closed)
Patch Set: nits (trybots prev) Created 3 years, 8 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
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
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/feature_list.h" 12 #include "base/feature_list.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/metrics/field_trial_params.h" 14 #include "base/metrics/field_trial_params.h"
15 #include "chrome/common/chrome_features.h" 15 #include "chrome/common/chrome_features.h"
16 #include "components/autofill/core/browser/autofill_experiments.h" 16 #include "components/autofill/core/browser/autofill_experiments.h"
17 #include "components/ntp_snippets/features.h" 17 #include "components/ntp_snippets/features.h"
18 #include "components/offline_pages/core/offline_page_feature.h" 18 #include "components/offline_pages/core/offline_page_feature.h"
19 #include "components/password_manager/core/common/password_manager_features.h" 19 #include "components/password_manager/core/common/password_manager_features.h"
20 #include "components/subresource_filter/core/browser/subresource_filter_features .h"
20 #include "content/public/common/content_features.h" 21 #include "content/public/common/content_features.h"
21 #include "jni/ChromeFeatureList_jni.h" 22 #include "jni/ChromeFeatureList_jni.h"
22 23
23 using base::android::ConvertJavaStringToUTF8; 24 using base::android::ConvertJavaStringToUTF8;
24 using base::android::ConvertUTF8ToJavaString; 25 using base::android::ConvertUTF8ToJavaString;
25 using base::android::JavaParamRef; 26 using base::android::JavaParamRef;
26 using base::android::ScopedJavaLocalRef; 27 using base::android::ScopedJavaLocalRef;
27 28
28 namespace chrome { 29 namespace chrome {
29 namespace android { 30 namespace android {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 &kWebPaymentsModifiers, 73 &kWebPaymentsModifiers,
73 &kWebPaymentsSingleAppUiSkip, 74 &kWebPaymentsSingleAppUiSkip,
74 &kWebVRCardboardSupport, 75 &kWebVRCardboardSupport,
75 &ntp_snippets::kIncreasedVisibility, 76 &ntp_snippets::kIncreasedVisibility,
76 &ntp_snippets::kForeignSessionsSuggestionsFeature, 77 &ntp_snippets::kForeignSessionsSuggestionsFeature,
77 &ntp_snippets::kPublisherFaviconsFromNewServerFeature, 78 &ntp_snippets::kPublisherFaviconsFromNewServerFeature,
78 &offline_pages::kBackgroundLoaderForDownloadsFeature, 79 &offline_pages::kBackgroundLoaderForDownloadsFeature,
79 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. 80 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421.
80 &offline_pages::kOfflinePagesSharingFeature, 81 &offline_pages::kOfflinePagesSharingFeature,
81 &password_manager::features::kViewPasswords, 82 &password_manager::features::kViewPasswords,
83 &subresource_filter::kSafeBrowsingSubresourceFilterExperimentalUI,
82 }; 84 };
83 85
84 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) { 86 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) {
85 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { 87 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) {
86 if (kFeaturesExposedToJava[i]->name == feature_name) 88 if (kFeaturesExposedToJava[i]->name == feature_name)
87 return kFeaturesExposedToJava[i]; 89 return kFeaturesExposedToJava[i];
88 } 90 }
89 NOTREACHED() << "Queried feature cannot be found in ChromeFeatureList: " 91 NOTREACHED() << "Queried feature cannot be found in ChromeFeatureList: "
90 << feature_name; 92 << feature_name;
91 return nullptr; 93 return nullptr;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name, 255 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name,
254 jdefault_value); 256 jdefault_value);
255 } 257 }
256 258
257 bool RegisterChromeFeatureListJni(JNIEnv* env) { 259 bool RegisterChromeFeatureListJni(JNIEnv* env) {
258 return RegisterNativesImpl(env); 260 return RegisterNativesImpl(env);
259 } 261 }
260 262
261 } // namespace android 263 } // namespace android
262 } // namespace chrome 264 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698