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 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ |
7 | 7 |
8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 namespace offline_pages { | 11 namespace offline_pages { |
12 | 12 |
13 extern const base::Feature kOfflineBookmarksFeature; | 13 extern const base::Feature kOfflineBookmarksFeature; |
14 extern const base::Feature kOffliningRecentPagesFeature; | 14 extern const base::Feature kOffliningRecentPagesFeature; |
15 extern const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature; | 15 extern const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature; |
16 extern const base::Feature kOfflinePagesCTFeature; | 16 extern const base::Feature kOfflinePagesCTFeature; |
17 extern const base::Feature kOfflinePagesSharingFeature; | 17 extern const base::Feature kOfflinePagesSharingFeature; |
18 extern const base::Feature kBackgroundLoaderForDownloadsFeature; | 18 extern const base::Feature kBackgroundLoaderForDownloadsFeature; |
19 extern const base::Feature kOfflinePagesAsyncDownloadFeature; | 19 extern const base::Feature kOfflinePagesAsyncDownloadFeature; |
20 extern const base::Feature kPrefetchingOfflinePagesFeature; | 20 extern const base::Feature kPrefetchingOfflinePagesFeature; |
21 extern const base::Feature kNewBackgroundLoaderFeature; | 21 extern const base::Feature kNewBackgroundLoaderFeature; |
| 22 extern const base::Feature kOfflinePagesLoadSignalCollectingFeature; |
22 | 23 |
23 // Returns true if saving bookmarked pages for offline viewing is enabled. | 24 // Returns true if saving bookmarked pages for offline viewing is enabled. |
24 bool IsOfflineBookmarksEnabled(); | 25 bool IsOfflineBookmarksEnabled(); |
25 | 26 |
26 // Returns true if offlining of recent pages (aka 'Last N pages') is enabled. | 27 // Returns true if offlining of recent pages (aka 'Last N pages') is enabled. |
27 bool IsOffliningRecentPagesEnabled(); | 28 bool IsOffliningRecentPagesEnabled(); |
28 | 29 |
29 // Returns true if offline CT features are enabled. See crbug.com/620421. | 30 // Returns true if offline CT features are enabled. See crbug.com/620421. |
30 bool IsOfflinePagesCTEnabled(); | 31 bool IsOfflinePagesCTEnabled(); |
31 | 32 |
32 // Returns true if offline page sharing is enabled. | 33 // Returns true if offline page sharing is enabled. |
33 bool IsOfflinePagesSharingEnabled(); | 34 bool IsOfflinePagesSharingEnabled(); |
34 | 35 |
35 // Returns true if saving a foreground tab that is taking too long using the | 36 // Returns true if saving a foreground tab that is taking too long using the |
36 // background scheduler is enabled. | 37 // background scheduler is enabled. |
37 bool IsBackgroundLoaderForDownloadsEnabled(); | 38 bool IsBackgroundLoaderForDownloadsEnabled(); |
38 | 39 |
39 // Returns true if concurrent background loading is enabled for svelte. | 40 // Returns true if concurrent background loading is enabled for svelte. |
40 bool IsOfflinePagesSvelteConcurrentLoadingEnabled(); | 41 bool IsOfflinePagesSvelteConcurrentLoadingEnabled(); |
41 | 42 |
42 // Returns true if downloading a page asynchonously is enabled. | 43 // Returns true if downloading a page asynchonously is enabled. |
43 bool IsOfflinePagesAsyncDownloadEnabled(); | 44 bool IsOfflinePagesAsyncDownloadEnabled(); |
44 | 45 |
45 // Returns true if prefetching offline pages is enabled. | 46 // Returns true if prefetching offline pages is enabled. |
46 bool IsPrefetchingOfflinePagesEnabled(); | 47 bool IsPrefetchingOfflinePagesEnabled(); |
47 | 48 |
| 49 // Returns true if we enable load timing signals to be collected. |
| 50 bool IsOfflinePagesLoadSignalCollectingEnabled(); |
| 51 |
48 // Returns true if we should use background loader rather than prerenderer | 52 // Returns true if we should use background loader rather than prerenderer |
49 // to offline pages. | 53 // to offline pages. |
50 bool ShouldUseNewBackgroundLoader(); | 54 bool ShouldUseNewBackgroundLoader(); |
51 | 55 |
52 // Returns true if a command line for test has been set that shortens the | 56 // Returns true if a command line for test has been set that shortens the |
53 // snapshot delay. | 57 // snapshot delay. |
54 bool ShouldUseTestingSnapshotDelay(); | 58 bool ShouldUseTestingSnapshotDelay(); |
55 | 59 |
56 } // namespace offline_pages | 60 } // namespace offline_pages |
57 | 61 |
58 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_FEATURE_H_ | 62 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_FEATURE_H_ |
OLD | NEW |