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

Side by Side Diff: ios/chrome/browser/about_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Implementation of about_flags for iOS that sets flags based on experimental 5 // Implementation of about_flags for iOS that sets flags based on experimental
6 // settings. 6 // settings.
7 7
8 #include "ios/chrome/browser/about_flags.h" 8 #include "ios/chrome/browser/about_flags.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Populate command line flag for the Payment Request API. 201 // Populate command line flag for the Payment Request API.
202 NSString* enable_payment_request = 202 NSString* enable_payment_request =
203 [defaults stringForKey:@"EnablePaymentRequest"]; 203 [defaults stringForKey:@"EnablePaymentRequest"];
204 if ([enable_payment_request isEqualToString:@"Enabled"]) { 204 if ([enable_payment_request isEqualToString:@"Enabled"]) {
205 command_line->AppendSwitch(switches::kEnablePaymentRequest); 205 command_line->AppendSwitch(switches::kEnablePaymentRequest);
206 } else if ([enable_payment_request isEqualToString:@"Disabled"]) { 206 } else if ([enable_payment_request isEqualToString:@"Disabled"]) {
207 command_line->AppendSwitch(switches::kDisablePaymentRequest); 207 command_line->AppendSwitch(switches::kDisablePaymentRequest);
208 } 208 }
209 209
210 // Populate command line flag for Spotlight Actions. 210 // Populate command line flag for Spotlight Actions.
211 NSString* enableSpotlightActions = 211 BOOL disableSpotlightActions =
212 [defaults stringForKey:@"EnableSpotlightActions"]; 212 [defaults boolForKey:@"DisableSpotlightActions"];
213 if ([enableSpotlightActions isEqualToString:@"Enabled"]) { 213 if (disableSpotlightActions) {
sdefresne 2016/09/20 16:56:22 You don't need the local variable here: if ([defa
jif 2016/09/20 18:34:57 Done.
214 command_line->AppendSwitch(switches::kEnableSpotlightActions);
215 } else if ([enableSpotlightActions isEqualToString:@"Disabled"]) {
216 command_line->AppendSwitch(switches::kDisableSpotlightActions); 214 command_line->AppendSwitch(switches::kDisableSpotlightActions);
217 } 215 }
218 216
219 // Freeform commandline flags. These are added last, so that any flags added 217 // Freeform commandline flags. These are added last, so that any flags added
220 // earlier in this function take precedence. 218 // earlier in this function take precedence.
221 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { 219 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
222 base::CommandLine::StringVector flags; 220 base::CommandLine::StringVector flags;
223 // Append an empty "program" argument. 221 // Append an empty "program" argument.
224 flags.push_back(""); 222 flags.push_back("");
225 223
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 299 }
302 300
303 namespace testing { 301 namespace testing {
304 302
305 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { 303 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) {
306 *count = arraysize(kFeatureEntries); 304 *count = arraysize(kFeatureEntries);
307 return kFeatureEntries; 305 return kFeatureEntries;
308 } 306 }
309 307
310 } // namespace testing 308 } // namespace testing
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/experimental_flags.mm » ('j') | ios/chrome/browser/experimental_flags.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698