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

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

Issue 2831553003: List our features in ntp_snippets::kAllFeatures (Closed)
Patch Set: rebase Created 3 years, 7 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/browser/ntp_snippets/ntp_snippets_features.h"
16 #include "chrome/common/chrome_features.h" 15 #include "chrome/common/chrome_features.h"
17 #include "components/autofill/core/browser/autofill_experiments.h" 16 #include "components/autofill/core/browser/autofill_experiments.h"
18 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_featu res.h" 17 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_featu res.h"
19 #include "components/ntp_snippets/features.h" 18 #include "components/ntp_snippets/features.h"
20 #include "components/offline_pages/core/offline_page_feature.h" 19 #include "components/offline_pages/core/offline_page_feature.h"
21 #include "components/password_manager/core/common/password_manager_features.h" 20 #include "components/password_manager/core/common/password_manager_features.h"
22 #include "components/subresource_filter/core/browser/subresource_filter_features .h" 21 #include "components/subresource_filter/core/browser/subresource_filter_features .h"
23 #include "content/public/common/content_features.h" 22 #include "content/public/common/content_features.h"
24 #include "jni/ChromeFeatureList_jni.h" 23 #include "jni/ChromeFeatureList_jni.h"
25 24
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 &kSpecialLocaleFeature, 74 &kSpecialLocaleFeature,
76 &kSpecialLocaleWrapper, 75 &kSpecialLocaleWrapper,
77 &kTabsInCBD, 76 &kTabsInCBD,
78 &kTabReparenting, 77 &kTabReparenting,
79 &kVideoPersistence, 78 &kVideoPersistence,
80 &kWebPaymentsModifiers, 79 &kWebPaymentsModifiers,
81 &kWebPaymentsSingleAppUiSkip, 80 &kWebPaymentsSingleAppUiSkip,
82 &kWebVRCardboardSupport, 81 &kWebVRCardboardSupport,
83 &ntp_snippets::kIncreasedVisibility, 82 &ntp_snippets::kIncreasedVisibility,
84 &ntp_snippets::kForeignSessionsSuggestionsFeature, 83 &ntp_snippets::kForeignSessionsSuggestionsFeature,
84 &ntp_snippets::kNotificationsFeature,
85 &ntp_snippets::kPublisherFaviconsFromNewServerFeature, 85 &ntp_snippets::kPublisherFaviconsFromNewServerFeature,
86 &offline_pages::kBackgroundLoaderForDownloadsFeature, 86 &offline_pages::kBackgroundLoaderForDownloadsFeature,
87 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. 87 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421.
88 &offline_pages::kOfflinePagesSharingFeature, 88 &offline_pages::kOfflinePagesSharingFeature,
89 &params::ntp_snippets::kNotificationsFeature,
90 &password_manager::features::kViewPasswords, 89 &password_manager::features::kViewPasswords,
91 &subresource_filter::kSafeBrowsingSubresourceFilterExperimentalUI, 90 &subresource_filter::kSafeBrowsingSubresourceFilterExperimentalUI,
92 }; 91 };
93 92
94 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) { 93 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) {
95 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { 94 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) {
96 if (kFeaturesExposedToJava[i]->name == feature_name) 95 if (kFeaturesExposedToJava[i]->name == feature_name)
97 return kFeaturesExposedToJava[i]; 96 return kFeaturesExposedToJava[i];
98 } 97 }
99 NOTREACHED() << "Queried feature cannot be found in ChromeFeatureList: " 98 NOTREACHED() << "Queried feature cannot be found in ChromeFeatureList: "
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name, 272 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name,
274 jdefault_value); 273 jdefault_value);
275 } 274 }
276 275
277 bool RegisterChromeFeatureListJni(JNIEnv* env) { 276 bool RegisterChromeFeatureListJni(JNIEnv* env) {
278 return RegisterNativesImpl(env); 277 return RegisterNativesImpl(env);
279 } 278 }
280 279
281 } // namespace android 280 } // namespace android
282 } // namespace chrome 281 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/android/ntp/content_suggestions_notification_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698