| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. | 78 &offline_pages::kOfflinePagesCTFeature, // See crbug.com/620421. |
| 79 &offline_pages::kOfflinePagesSharingFeature, | 79 &offline_pages::kOfflinePagesSharingFeature, |
| 80 &password_manager::features::kViewPasswords, | 80 &password_manager::features::kViewPasswords, |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) { | 83 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) { |
| 84 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { | 84 for (size_t i = 0; i < arraysize(kFeaturesExposedToJava); ++i) { |
| 85 if (kFeaturesExposedToJava[i]->name == feature_name) | 85 if (kFeaturesExposedToJava[i]->name == feature_name) |
| 86 return kFeaturesExposedToJava[i]; | 86 return kFeaturesExposedToJava[i]; |
| 87 } | 87 } |
| 88 NOTREACHED() << "Features queried via ChromeFeatureList must be present in " | 88 NOTREACHED() << "Queried feature cannot be found in ChromeFeatureList: " |
| 89 "|kFeaturesExposedToJava|."; | 89 << feature_name; |
| 90 return nullptr; | 90 return nullptr; |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| 95 // Alphabetical: | 95 // Alphabetical: |
| 96 const base::Feature kAndroidPayIntegrationV1{"AndroidPayIntegrationV1", | 96 const base::Feature kAndroidPayIntegrationV1{"AndroidPayIntegrationV1", |
| 97 base::FEATURE_ENABLED_BY_DEFAULT}; | 97 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 98 | 98 |
| 99 const base::Feature kAndroidPayIntegrationV2{"AndroidPayIntegrationV2", | 99 const base::Feature kAndroidPayIntegrationV2{"AndroidPayIntegrationV2", |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name, | 243 return base::GetFieldTrialParamByFeatureAsBool(*feature, param_name, |
| 244 jdefault_value); | 244 jdefault_value); |
| 245 } | 245 } |
| 246 | 246 |
| 247 bool RegisterChromeFeatureListJni(JNIEnv* env) { | 247 bool RegisterChromeFeatureListJni(JNIEnv* env) { |
| 248 return RegisterNativesImpl(env); | 248 return RegisterNativesImpl(env); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace android | 251 } // namespace android |
| 252 } // namespace chrome | 252 } // namespace chrome |
| OLD | NEW |