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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return base::StartsWith(group_name, "Enabled", |
221 base::CompareCase::INSENSITIVE_ASCII); | 221 base::CompareCase::INSENSITIVE_ASCII); |
222 } | 222 } |
223 | 223 |
224 bool IsQRCodeReaderEnabled() { | |
225 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | |
226 return !command_line->HasSwitch(switches::kDisableQRScanner); | |
227 } | |
228 | |
229 bool IsReaderModeEnabled() { | 224 bool IsReaderModeEnabled() { |
230 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 225 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
231 switches::kEnableReaderModeToolbarIcon); | 226 switches::kEnableReaderModeToolbarIcon); |
232 } | 227 } |
233 | 228 |
234 bool IsReadingListEnabled() { | 229 bool IsReadingListEnabled() { |
235 return reading_list::switches::IsReadingListEnabled(); | 230 return reading_list::switches::IsReadingListEnabled(); |
236 } | 231 } |
237 | 232 |
238 bool IsSafariVCSignInEnabled() { | 233 bool IsSafariVCSignInEnabled() { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return true; | 287 return true; |
293 | 288 |
294 if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) | 289 if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) |
295 return false; | 290 return false; |
296 | 291 |
297 // By default, disable it. | 292 // By default, disable it. |
298 return false; | 293 return false; |
299 } | 294 } |
300 | 295 |
301 } // namespace experimental_flags | 296 } // namespace experimental_flags |
OLD | NEW |