Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file can be empty. Its purpose is to contain the relatively short lived | 5 // This file can be empty. Its purpose is to contain the relatively short lived |
| 6 // definitions required for experimental flags. | 6 // definitions required for experimental flags. |
| 7 | 7 |
| 8 #include "ios/chrome/browser/experimental_flags.h" | 8 #include "ios/chrome/browser/experimental_flags.h" |
| 9 | 9 |
| 10 #include <dispatch/dispatch.h> | 10 #include <dispatch/dispatch.h> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 std::string group_name = | 114 std::string group_name = |
| 115 base::FieldTrialList::FindFullName("RemoveAllBookmarks"); | 115 base::FieldTrialList::FindFullName("RemoveAllBookmarks"); |
| 116 | 116 |
| 117 if (group_name.empty()) { | 117 if (group_name.empty()) { |
| 118 return true; // If no finch experiment, keep all bookmarks enabled. | 118 return true; // If no finch experiment, keep all bookmarks enabled. |
| 119 } | 119 } |
| 120 return base::StartsWith(group_name, "Enabled", | 120 return base::StartsWith(group_name, "Enabled", |
| 121 base::CompareCase::INSENSITIVE_ASCII); | 121 base::CompareCase::INSENSITIVE_ASCII); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool IsPhysicalWebEnabled() { | |
| 125 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
| |
| 126 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { | |
| 127 return true; | |
| 128 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { | |
| 129 return false; | |
| 130 } | |
| 131 | |
| 132 // Check if the finch experiment is turned on | |
| 133 std::string group_name = | |
| 134 base::FieldTrialList::FindFullName("PhysicalWebEnabled"); | |
| 135 return base::StartsWith(group_name, "Enabled", | |
| 136 base::CompareCase::INSENSITIVE_ASCII); | |
| 137 } | |
| 138 | |
| 124 } // namespace experimental_flags | 139 } // namespace experimental_flags |
| OLD | NEW |