| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 FeatureMode mode = GetOfflinePageFeatureMode(); | 76 FeatureMode mode = GetOfflinePageFeatureMode(); |
| 77 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || | 77 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || |
| 78 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; | 78 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool IsOffliningRecentPagesEnabled() { | 81 bool IsOffliningRecentPagesEnabled() { |
| 82 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature) && | 82 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature) && |
| 83 IsOfflinePagesEnabled(); | 83 IsOfflinePagesEnabled(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool IsOfflinePagesBackgroundLoadingEnabled() { |
| 87 return (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 88 switches::kEnableOfflinePagesBackgroundLoading)); |
| 89 } |
| 90 |
| 86 } // namespace offline_pages | 91 } // namespace offline_pages |
| OLD | NEW |