Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: ios/chrome/browser/experimental_flags.mm

Issue 2355743004: Enable Spotlight Actions by default. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« ios/chrome/browser/about_flags.mm ('K') | « ios/chrome/browser/about_flags.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698