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

Unified Diff: ios/chrome/browser/experimental_flags.mm

Issue 2088993005: Add Physical Web experiment and command line flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ios/chrome/browser/experimental_flags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/experimental_flags.mm
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index 1081ddd752fcbbd8eadbe1520658aea7e5ed58e3..5e6be562c46df578d8abf208c01bef8ee9a0e692 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -121,4 +121,19 @@ bool IsAllBookmarksEnabled() {
base::CompareCase::INSENSITIVE_ASCII);
}
+bool IsPhysicalWebEnabled() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
Olivier 2016/06/24 07:52:33 I think you should check for the NSUserDefault to
mattreynolds 2016/06/24 17:47:20 I think this is unnecessary because in about_flags
+ if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) {
+ return true;
+ } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) {
+ return false;
+ }
+
+ // Check if the finch experiment is turned on
+ std::string group_name =
+ base::FieldTrialList::FindFullName("PhysicalWebEnabled");
+ return base::StartsWith(group_name, "Enabled",
+ base::CompareCase::INSENSITIVE_ASCII);
+}
+
} // namespace experimental_flags
« no previous file with comments | « ios/chrome/browser/experimental_flags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698