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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 return false; | 180 return false; |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Check if the Finch experiment is turned on. | 183 // Check if the Finch experiment is turned on. |
| 184 return base::StartsWith(group_name, "Enabled", | 184 return base::StartsWith(group_name, "Enabled", |
| 185 base::CompareCase::INSENSITIVE_ASCII); | 185 base::CompareCase::INSENSITIVE_ASCII); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool IsSpotlightActionsEnabled() { | 188 bool IsSpotlightActionsEnabled() { |
| 189 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 189 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 190 if (command_line->HasSwitch(switches::kEnableSpotlightActions)) { | 190 if (command_line->HasSwitch(switches::kDisableSpotlightActions)) { |
|
sdefresne
2016/09/20 16:56:22
return !command_line->HasSwitch(switches::kDisable
jif
2016/09/20 18:34:57
Done.
| |
| 191 return true; | |
| 192 } else if (command_line->HasSwitch(switches::kDisableSpotlightActions)) { | |
| 193 return false; | 191 return false; |
| 194 } | 192 } |
| 195 | 193 return true; |
| 196 // Check if the finch experiment is turned on. | |
| 197 std::string group_name = | |
| 198 base::FieldTrialList::FindFullName("SpotlightActionsEnabled"); | |
| 199 return base::StartsWith(group_name, "Enabled", | |
| 200 base::CompareCase::INSENSITIVE_ASCII); | |
| 201 } | 194 } |
| 202 | 195 |
| 203 } // namespace experimental_flags | 196 } // namespace experimental_flags |
| OLD | NEW |