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 "components/offline_pages/core/offline_page_feature.h" | 5 #include "components/offline_pages/core/offline_page_feature.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 const base::Feature kOfflinePagesCTFeature{"OfflinePagesCT", | 30 const base::Feature kOfflinePagesCTFeature{"OfflinePagesCT", |
31 base::FEATURE_ENABLED_BY_DEFAULT}; | 31 base::FEATURE_ENABLED_BY_DEFAULT}; |
32 | 32 |
33 const base::Feature kOfflinePagesSharingFeature{ | 33 const base::Feature kOfflinePagesSharingFeature{ |
34 "OfflinePagesSharing", base::FEATURE_DISABLED_BY_DEFAULT}; | 34 "OfflinePagesSharing", base::FEATURE_DISABLED_BY_DEFAULT}; |
35 | 35 |
36 const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature{ | 36 const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature{ |
37 "OfflinePagesSvelteConcurrentLoading", base::FEATURE_DISABLED_BY_DEFAULT}; | 37 "OfflinePagesSvelteConcurrentLoading", base::FEATURE_DISABLED_BY_DEFAULT}; |
38 | 38 |
| 39 const base::Feature kOfflinePagesLoadSignalCollectingFeature{ |
| 40 "OfflinePagesLoadSignalCollecting", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 41 |
39 const base::Feature kBackgroundLoaderForDownloadsFeature{ | 42 const base::Feature kBackgroundLoaderForDownloadsFeature{ |
40 "BackgroundLoadingForDownloads", base::FEATURE_ENABLED_BY_DEFAULT}; | 43 "BackgroundLoadingForDownloads", base::FEATURE_ENABLED_BY_DEFAULT}; |
41 | 44 |
42 const base::Feature kOfflinePagesAsyncDownloadFeature{ | 45 const base::Feature kOfflinePagesAsyncDownloadFeature{ |
43 "OfflinePagesAsyncDownload", base::FEATURE_DISABLED_BY_DEFAULT}; | 46 "OfflinePagesAsyncDownload", base::FEATURE_DISABLED_BY_DEFAULT}; |
44 | 47 |
45 const base::Feature kPrefetchingOfflinePagesFeature{ | 48 const base::Feature kPrefetchingOfflinePagesFeature{ |
46 "OfflinePagesPrefetching", base::FEATURE_DISABLED_BY_DEFAULT}; | 49 "OfflinePagesPrefetching", base::FEATURE_DISABLED_BY_DEFAULT}; |
47 | 50 |
48 const base::Feature kNewBackgroundLoaderFeature { | 51 const base::Feature kNewBackgroundLoaderFeature { |
(...skipping 26 matching lines...) Expand all Loading... |
75 } | 78 } |
76 | 79 |
77 bool IsOfflinePagesAsyncDownloadEnabled() { | 80 bool IsOfflinePagesAsyncDownloadEnabled() { |
78 return base::FeatureList::IsEnabled(kOfflinePagesAsyncDownloadFeature); | 81 return base::FeatureList::IsEnabled(kOfflinePagesAsyncDownloadFeature); |
79 } | 82 } |
80 | 83 |
81 bool IsPrefetchingOfflinePagesEnabled() { | 84 bool IsPrefetchingOfflinePagesEnabled() { |
82 return base::FeatureList::IsEnabled(kPrefetchingOfflinePagesFeature); | 85 return base::FeatureList::IsEnabled(kPrefetchingOfflinePagesFeature); |
83 } | 86 } |
84 | 87 |
| 88 bool IsOfflinePagesLoadSignalCollectingEnabled() { |
| 89 return base::FeatureList::IsEnabled(kOfflinePagesLoadSignalCollectingFeature); |
| 90 } |
| 91 |
85 bool ShouldUseNewBackgroundLoader() { | 92 bool ShouldUseNewBackgroundLoader() { |
86 return base::FeatureList::IsEnabled(kNewBackgroundLoaderFeature); | 93 return base::FeatureList::IsEnabled(kNewBackgroundLoaderFeature); |
87 } | 94 } |
88 | 95 |
89 bool ShouldUseTestingSnapshotDelay() { | 96 bool ShouldUseTestingSnapshotDelay() { |
90 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 97 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
91 return cl->HasSwitch(switches::kOfflinePagesUseTestingSnapshotDelay); | 98 return cl->HasSwitch(switches::kOfflinePagesUseTestingSnapshotDelay); |
92 } | 99 } |
93 | 100 |
94 } // namespace offline_pages | 101 } // namespace offline_pages |
OLD | NEW |