| 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 2d63da71eee2b882d35b7f127efd087d6419731d..8d51f527564137aff2d33e4f89293572ae5c2f54 100644
|
| --- a/components/offline_pages/offline_page_feature.cc
|
| +++ b/components/offline_pages/offline_page_feature.cc
|
| @@ -6,7 +6,9 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/command_line.h"
|
| #include "base/metrics/field_trial.h"
|
| +#include "components/offline_pages/offline_page_switches.h"
|
|
|
| #if defined(OS_ANDROID)
|
|
|
| @@ -18,6 +20,15 @@ const char kOfflinePagesFieldTrialEnabledGroupName[] = "Enabled";
|
| } // namespace
|
|
|
| bool IsOfflinePagesEnabled() {
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableOfflinePages)) {
|
| + return true;
|
| + }
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kDisableOfflinePages)) {
|
| + return false;
|
| + }
|
| +
|
| std::string group_name =
|
| base::FieldTrialList::FindFullName(kOfflinePagesFieldTrialName);
|
| return group_name == kOfflinePagesFieldTrialEnabledGroupName;
|
|
|