diff options
author | jianli <jianli@chromium.org> | 2015-08-03 18:06:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-04 01:07:48 +0000 |
commit | f2c2a0d281d92e59150bd8f9fabfbdeeeb16d465 (patch) | |
tree | 8f128c9714f9576059cebad3e5f77622de17a56a /components/offline_pages/offline_page_feature.cc | |
parent | c692afec196e08584c548f79db3e029606554a7f (diff) | |
download | chromium_src-f2c2a0d281d92e59150bd8f9fabfbdeeeb16d465.zip chromium_src-f2c2a0d281d92e59150bd8f9fabfbdeeeb16d465.tar.gz chromium_src-f2c2a0d281d92e59150bd8f9fabfbdeeeb16d465.tar.bz2 |
Support field trial check for offline pages feature
BUG=491352
TEST=none
Review URL: https://codereview.chromium.org/1257103005
Cr-Commit-Position: refs/heads/master@{#341661}
Diffstat (limited to 'components/offline_pages/offline_page_feature.cc')
-rw-r--r-- | components/offline_pages/offline_page_feature.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/offline_pages/offline_page_feature.cc b/components/offline_pages/offline_page_feature.cc new file mode 100644 index 0000000..2d63da7 --- /dev/null +++ b/components/offline_pages/offline_page_feature.cc @@ -0,0 +1,28 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/offline_pages/offline_page_feature.h" + +#include <string> + +#include "base/metrics/field_trial.h" + +#if defined(OS_ANDROID) + +namespace offline_pages { + +namespace { +const char kOfflinePagesFieldTrialName[] = "OfflinePages"; +const char kOfflinePagesFieldTrialEnabledGroupName[] = "Enabled"; +} // namespace + +bool IsOfflinePagesEnabled() { + std::string group_name = + base::FieldTrialList::FindFullName(kOfflinePagesFieldTrialName); + return group_name == kOfflinePagesFieldTrialEnabledGroupName; +} + +} // namespace offline_pages + +#endif |