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

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

Issue 2355743004: Enable Spotlight Actions by default. (Closed)
Patch Set: Fix compilation error. 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
« no previous file with comments | « ios/chrome/browser/about_flags.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 return !command_line->HasSwitch(switches::kDisableSpotlightActions);
191 return true;
192 } else if (command_line->HasSwitch(switches::kDisableSpotlightActions)) {
193 return false;
194 }
195
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 } 191 }
202 192
203 } // namespace experimental_flags 193 } // namespace experimental_flags
OLDNEW
« no previous file with comments | « ios/chrome/browser/about_flags.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698