Chromium Code Reviews| Index: components/offline_pages/offline_page_feature.cc |
| diff --git a/components/offline_pages/offline_page_feature.cc b/components/offline_pages/offline_page_feature.cc |
| index beee145d8398d9618a126bcad5070aa3bbb0039c..f6b7dac57526cab19b58b50409d1eec491244726 100644 |
| --- a/components/offline_pages/offline_page_feature.cc |
| +++ b/components/offline_pages/offline_page_feature.cc |
| @@ -71,6 +71,17 @@ bool IsOfflinePagesEnabled() { |
| mode == FeatureMode::ENABLED_AS_SAVED_PAGES; |
| } |
| +bool IsOffliningRecentPagesEnabled() { |
| + bool hasDisableSwitch = base::CommandLine::ForCurrentProcess()->HasSwitch( |
|
jianli
2016/03/02 00:52:31
nit: C++ style
|
| + switches::kDisableOffliningRecentPages); |
| + bool hasEnableSwitch = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableOffliningRecentPages); |
| + |
| + // Default is 'disable'. |
| + return !hasDisableSwitch && hasEnableSwitch && IsOfflinePagesEnabled(); |
| +} |
| + |
| + |
| } // namespace offline_pages |
| #endif |