| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 // Populate command line flag for the Payment Request API. | 228 // Populate command line flag for the Payment Request API. |
| 229 NSString* enable_payment_request = | 229 NSString* enable_payment_request = |
| 230 [defaults stringForKey:@"EnablePaymentRequest"]; | 230 [defaults stringForKey:@"EnablePaymentRequest"]; |
| 231 if ([enable_payment_request isEqualToString:@"Enabled"]) { | 231 if ([enable_payment_request isEqualToString:@"Enabled"]) { |
| 232 command_line->AppendSwitch(switches::kEnablePaymentRequest); | 232 command_line->AppendSwitch(switches::kEnablePaymentRequest); |
| 233 } else if ([enable_payment_request isEqualToString:@"Disabled"]) { | 233 } else if ([enable_payment_request isEqualToString:@"Disabled"]) { |
| 234 command_line->AppendSwitch(switches::kDisablePaymentRequest); | 234 command_line->AppendSwitch(switches::kDisablePaymentRequest); |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Populate command line flags from Reading List. |
| 238 if ([defaults boolForKey:@"EnableReadingList"]) { |
| 239 command_line->AppendSwitch(reading_list::switches::kEnableReadingList); |
| 240 } else { |
| 241 command_line->AppendSwitch(reading_list::switches::kDisableReadingList); |
| 242 } |
| 243 |
| 237 // Populate command line flag for Spotlight Actions. | 244 // Populate command line flag for Spotlight Actions. |
| 238 if ([defaults boolForKey:@"DisableSpotlightActions"]) { | 245 if ([defaults boolForKey:@"DisableSpotlightActions"]) { |
| 239 command_line->AppendSwitch(switches::kDisableSpotlightActions); | 246 command_line->AppendSwitch(switches::kDisableSpotlightActions); |
| 240 } | 247 } |
| 241 | 248 |
| 242 // Populate command line flag for the Rename "Save Image" to "Download Image" | 249 // Populate command line flag for the Rename "Save Image" to "Download Image" |
| 243 // experiment. | 250 // experiment. |
| 244 NSString* enableDownloadRenaming = | 251 NSString* enableDownloadRenaming = |
| 245 [defaults stringForKey:@"EnableDownloadRenaming"]; | 252 [defaults stringForKey:@"EnableDownloadRenaming"]; |
| 246 if ([enableDownloadRenaming isEqualToString:@"Enabled"]) { | 253 if ([enableDownloadRenaming isEqualToString:@"Enabled"]) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 341 } |
| 335 | 342 |
| 336 namespace testing { | 343 namespace testing { |
| 337 | 344 |
| 338 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 345 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 339 *count = arraysize(kFeatureEntries); | 346 *count = arraysize(kFeatureEntries); |
| 340 return kFeatureEntries; | 347 return kFeatureEntries; |
| 341 } | 348 } |
| 342 | 349 |
| 343 } // namespace testing | 350 } // namespace testing |
| OLD | NEW |