| 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 kOffliningUsesNavigationTriggersFeature; |
| 15 extern const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature; | 16 extern const base::Feature kOfflinePagesSvelteConcurrentLoadingFeature; |
| 16 extern const base::Feature kOfflinePagesCTFeature; | 17 extern const base::Feature kOfflinePagesCTFeature; |
| 17 extern const base::Feature kOfflinePagesSharingFeature; | 18 extern const base::Feature kOfflinePagesSharingFeature; |
| 18 extern const base::Feature kBackgroundLoaderForDownloadsFeature; | 19 extern const base::Feature kBackgroundLoaderForDownloadsFeature; |
| 19 extern const base::Feature kOfflinePagesAsyncDownloadFeature; | 20 extern const base::Feature kOfflinePagesAsyncDownloadFeature; |
| 20 extern const base::Feature kNewBackgroundLoaderFeature; | 21 extern const base::Feature kNewBackgroundLoaderFeature; |
| 21 | 22 |
| 22 // Returns true if saving bookmarked pages for offline viewing is enabled. | 23 // Returns true if saving bookmarked pages for offline viewing is enabled. |
| 23 bool IsOfflineBookmarksEnabled(); | 24 bool IsOfflineBookmarksEnabled(); |
| 24 | 25 |
| 25 // Returns true if offlining of recent pages (aka 'Last N pages') is enabled. | 26 // Returns true if offlining of recent pages (aka 'Last N pages') is enabled. |
| 26 bool IsOffliningRecentPagesEnabled(); | 27 bool IsOffliningRecentPagesEnabled(); |
| 27 | 28 |
| 29 // Returns true only if both offlining of recent pages is enabled and navigation |
| 30 // events should be used to create snapshots of recent pages. |
| 31 bool IsOffliningRecentPagesUsingNavigationTriggers(); |
| 32 |
| 33 // Returns true only if both offlining of recent pages is enabled and user |
| 34 // interaction events should be used to create snapshots of recent pages. |
| 35 bool IsOffliningRecentPagesUsingInteractionTriggers(); |
| 36 |
| 28 // Returns true if offline CT features are enabled. See crbug.com/620421. | 37 // Returns true if offline CT features are enabled. See crbug.com/620421. |
| 29 bool IsOfflinePagesCTEnabled(); | 38 bool IsOfflinePagesCTEnabled(); |
| 30 | 39 |
| 31 // Returns true if offline page sharing is enabled. | 40 // Returns true if offline page sharing is enabled. |
| 32 bool IsOfflinePagesSharingEnabled(); | 41 bool IsOfflinePagesSharingEnabled(); |
| 33 | 42 |
| 34 // Returns true if saving a foreground tab that is taking too long using the | 43 // Returns true if saving a foreground tab that is taking too long using the |
| 35 // background scheduler is enabled. | 44 // background scheduler is enabled. |
| 36 bool IsBackgroundLoaderForDownloadsEnabled(); | 45 bool IsBackgroundLoaderForDownloadsEnabled(); |
| 37 | 46 |
| 38 // Returns true if concurrent background loading is enabled for svelte. | 47 // Returns true if concurrent background loading is enabled for svelte. |
| 39 bool IsOfflinePagesSvelteConcurrentLoadingEnabled(); | 48 bool IsOfflinePagesSvelteConcurrentLoadingEnabled(); |
| 40 | 49 |
| 41 // Returns true if downloading a page asynchonously is enabled. | 50 // Returns true if downloading a page asynchonously is enabled. |
| 42 bool IsOfflinePagesAsyncDownloadEnabled(); | 51 bool IsOfflinePagesAsyncDownloadEnabled(); |
| 43 | 52 |
| 44 // Returns true if we should use background loader rather than prerenderer | 53 // Returns true if we should use background loader rather than prerenderer |
| 45 // to offline pages. | 54 // to offline pages. |
| 46 bool ShouldUseNewBackgroundLoader(); | 55 bool ShouldUseNewBackgroundLoader(); |
| 47 | 56 |
| 48 } // namespace offline_pages | 57 } // namespace offline_pages |
| 49 | 58 |
| 50 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_FEATURE_H_ | 59 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_FEATURE_H_ |
| OLD | NEW |