Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: components/offline_pages/offline_page_feature.cc

Issue 1260403004: Add about flag for offline page experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update strings per feedback Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/BUILD.gn ('k') | components/offline_pages/offline_page_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « components/offline_pages/BUILD.gn ('k') | components/offline_pages/offline_page_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698