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 |
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 "chrome/common/chrome_features.h" | 14 #include "chrome/common/chrome_features.h" |
| 15 #include "components/offline_pages/offline_page_feature.h" |
15 #include "jni/ChromeFeatureList_jni.h" | 16 #include "jni/ChromeFeatureList_jni.h" |
16 | 17 |
17 using base::android::ConvertJavaStringToUTF8; | 18 using base::android::ConvertJavaStringToUTF8; |
18 | 19 |
19 namespace chrome { | 20 namespace chrome { |
20 namespace android { | 21 namespace android { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 // Array of features exposed through the Java ChromeFeatureList API. Entries in | 25 // Array of features exposed through the Java ChromeFeatureList API. Entries in |
25 // this array may either refer to features defined in this file (above) or in | 26 // this array may either refer to features defined in this file (above) or in |
26 // other locations in the code base (e.g. chrome/, components/, etc). | 27 // other locations in the code base (e.g. chrome/, components/, etc). |
27 const base::Feature* kFeaturesExposedToJava[] = { | 28 const base::Feature* kFeaturesExposedToJava[] = { |
28 &kNTPOfflinePagesFeature, | 29 &kNTPOfflinePagesFeature, |
29 &kNTPSnippetsFeature, | 30 &kNTPSnippetsFeature, |
30 &kPhysicalWebFeature, | 31 &kPhysicalWebFeature, |
31 &features::kSimplifiedFullscreenUI, | 32 &features::kSimplifiedFullscreenUI, |
| 33 &offline_pages::kOfflinePagesBackgroundLoadingFeature, |
32 }; | 34 }; |
33 | 35 |
34 } // namespace | 36 } // namespace |
35 | 37 |
36 const base::Feature kNTPOfflinePagesFeature { | 38 const base::Feature kNTPOfflinePagesFeature { |
37 "NTPOfflinePages", base::FEATURE_DISABLED_BY_DEFAULT | 39 "NTPOfflinePages", base::FEATURE_DISABLED_BY_DEFAULT |
38 }; | 40 }; |
39 | 41 |
40 const base::Feature kNTPSnippetsFeature { | 42 const base::Feature kNTPSnippetsFeature { |
41 "NTPSnippets", base::FEATURE_DISABLED_BY_DEFAULT | 43 "NTPSnippets", base::FEATURE_DISABLED_BY_DEFAULT |
(...skipping 19 matching lines...) Expand all Loading... |
61 NOTREACHED(); | 63 NOTREACHED(); |
62 return false; | 64 return false; |
63 } | 65 } |
64 | 66 |
65 bool RegisterChromeFeatureListJni(JNIEnv* env) { | 67 bool RegisterChromeFeatureListJni(JNIEnv* env) { |
66 return RegisterNativesImpl(env); | 68 return RegisterNativesImpl(env); |
67 } | 69 } |
68 | 70 |
69 } // namespace android | 71 } // namespace android |
70 } // namespace chrome | 72 } // namespace chrome |
OLD | NEW |