| OLD | NEW |
| 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 Loading... |
| 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 if ([defaults boolForKey:@"DisableSpotlightActions"]) { |
| 212 [defaults stringForKey:@"EnableSpotlightActions"]; | |
| 213 if ([enableSpotlightActions isEqualToString:@"Enabled"]) { | |
| 214 command_line->AppendSwitch(switches::kEnableSpotlightActions); | |
| 215 } else if ([enableSpotlightActions isEqualToString:@"Disabled"]) { | |
| 216 command_line->AppendSwitch(switches::kDisableSpotlightActions); | 212 command_line->AppendSwitch(switches::kDisableSpotlightActions); |
| 217 } | 213 } |
| 218 | 214 |
| 219 // Freeform commandline flags. These are added last, so that any flags added | 215 // Freeform commandline flags. These are added last, so that any flags added |
| 220 // earlier in this function take precedence. | 216 // earlier in this function take precedence. |
| 221 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { | 217 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { |
| 222 base::CommandLine::StringVector flags; | 218 base::CommandLine::StringVector flags; |
| 223 // Append an empty "program" argument. | 219 // Append an empty "program" argument. |
| 224 flags.push_back(""); | 220 flags.push_back(""); |
| 225 | 221 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 297 } |
| 302 | 298 |
| 303 namespace testing { | 299 namespace testing { |
| 304 | 300 |
| 305 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 301 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 306 *count = arraysize(kFeatureEntries); | 302 *count = arraysize(kFeatureEntries); |
| 307 return kFeatureEntries; | 303 return kFeatureEntries; |
| 308 } | 304 } |
| 309 | 305 |
| 310 } // namespace testing | 306 } // namespace testing |
| OLD | NEW |