| 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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return version_info::IsOfficialBuild() ? FeatureMode::DISABLED | 68 return version_info::IsOfficialBuild() ? FeatureMode::DISABLED |
| 69 : FeatureMode::ENABLED_AS_BOOKMARKS; | 69 : FeatureMode::ENABLED_AS_BOOKMARKS; |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool IsOfflinePagesEnabled() { | 72 bool IsOfflinePagesEnabled() { |
| 73 FeatureMode mode = GetOfflinePageFeatureMode(); | 73 FeatureMode mode = GetOfflinePageFeatureMode(); |
| 74 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || | 74 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || |
| 75 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; | 75 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool IsOfflinePagesBackgroundLoadingEnabled() {; |
| 79 return (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 80 switches::kEnableOfflinePagesBackgroundLoading)); |
| 81 } |
| 82 |
| 78 } // namespace offline_pages | 83 } // namespace offline_pages |
| 79 | 84 |
| 80 #endif | 85 #endif |
| OLD | NEW |