| 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/offline_page_feature.h" | 5 #include "components/offline_pages/offline_page_feature.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 | 10 |
| 11 namespace offline_pages { | 11 namespace offline_pages { |
| 12 | 12 |
| 13 const base::Feature kOfflineBookmarksFeature { | 13 const base::Feature kOfflineBookmarksFeature { |
| 14 "OfflineBookmarks", base::FEATURE_DISABLED_BY_DEFAULT | 14 "OfflineBookmarks", base::FEATURE_DISABLED_BY_DEFAULT |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 const base::Feature kOffliningRecentPagesFeature { | 17 const base::Feature kOffliningRecentPagesFeature { |
| 18 "OfflineRecentPages", base::FEATURE_DISABLED_BY_DEFAULT | 18 "OfflineRecentPages", base::FEATURE_DISABLED_BY_DEFAULT |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 const base::Feature kOfflinePagesBackgroundLoadingFeature { | 21 const base::Feature kOfflinePagesBackgroundLoadingFeature { |
| 22 "OfflinePagesBackgroundLoading", base::FEATURE_DISABLED_BY_DEFAULT | 22 "OfflinePagesBackgroundLoading", base::FEATURE_DISABLED_BY_DEFAULT |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 const base::Feature kOfflinePagesSharingFeature{ |
| 26 "OfflinePagesSharing", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 27 |
| 25 bool IsOfflinePagesEnabled() { | 28 bool IsOfflinePagesEnabled() { |
| 26 return IsOfflineBookmarksEnabled() || IsOffliningRecentPagesEnabled() || | 29 return IsOfflineBookmarksEnabled() || IsOffliningRecentPagesEnabled() || |
| 27 IsOfflinePagesBackgroundLoadingEnabled(); | 30 IsOfflinePagesBackgroundLoadingEnabled() || |
| 31 IsOfflinePagesSharingEnabled(); |
| 28 } | 32 } |
| 29 | 33 |
| 30 bool IsOfflineBookmarksEnabled() { | 34 bool IsOfflineBookmarksEnabled() { |
| 31 return base::FeatureList::IsEnabled(kOfflineBookmarksFeature); | 35 return base::FeatureList::IsEnabled(kOfflineBookmarksFeature); |
| 32 } | 36 } |
| 33 | 37 |
| 34 bool IsOffliningRecentPagesEnabled() { | 38 bool IsOffliningRecentPagesEnabled() { |
| 35 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature); | 39 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature); |
| 36 } | 40 } |
| 37 | 41 |
| 38 bool IsOfflinePagesBackgroundLoadingEnabled() { | 42 bool IsOfflinePagesBackgroundLoadingEnabled() { |
| 39 return base::FeatureList::IsEnabled(kOfflinePagesBackgroundLoadingFeature); | 43 return base::FeatureList::IsEnabled(kOfflinePagesBackgroundLoadingFeature); |
| 40 } | 44 } |
| 41 | 45 |
| 46 bool IsOfflinePagesSharingEnabled() { |
| 47 return base::FeatureList::IsEnabled(kOfflinePagesSharingFeature); |
| 48 } |
| 49 |
| 42 } // namespace offline_pages | 50 } // namespace offline_pages |
| OLD | NEW |