Chromium Code Reviews| 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 |