| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 207 } |
| 208 | 208 |
| 209 bool IsPhysicalWebEnabled() { | 209 bool IsPhysicalWebEnabled() { |
| 210 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 210 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 211 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { | 211 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { |
| 212 return true; | 212 return true; |
| 213 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { | 213 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { |
| 214 return false; | 214 return false; |
| 215 } | 215 } |
| 216 | 216 |
| 217 // Check if the finch experiment is turned on | 217 // Check if the Finch experiment is turned on. |
| 218 std::string group_name = | 218 std::string group_name = |
| 219 base::FieldTrialList::FindFullName("PhysicalWebEnabled"); | 219 base::FieldTrialList::FindFullName("PhysicalWebEnabled"); |
| 220 return base::StartsWith(group_name, "Enabled", | 220 // The feature is enabled by default. |
| 221 base::CompareCase::INSENSITIVE_ASCII); | 221 return !base::StartsWith(group_name, "Disabled", |
| 222 base::CompareCase::INSENSITIVE_ASCII); |
| 222 } | 223 } |
| 223 | 224 |
| 224 bool IsReaderModeEnabled() { | 225 bool IsReaderModeEnabled() { |
| 225 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 226 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 226 switches::kEnableReaderModeToolbarIcon); | 227 switches::kEnableReaderModeToolbarIcon); |
| 227 } | 228 } |
| 228 | 229 |
| 229 bool IsReadingListEnabled() { | 230 bool IsReadingListEnabled() { |
| 230 return reading_list::switches::IsReadingListEnabled(); | 231 return reading_list::switches::IsReadingListEnabled(); |
| 231 } | 232 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 return true; | 270 return true; |
| 270 | 271 |
| 271 if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) | 272 if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) |
| 272 return false; | 273 return false; |
| 273 | 274 |
| 274 // By default, disable it. | 275 // By default, disable it. |
| 275 return false; | 276 return false; |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace experimental_flags | 279 } // namespace experimental_flags |
| OLD | NEW |