| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Populate command line flag for the SnapshotLRUCache experiment from the | 115 // Populate command line flag for the SnapshotLRUCache experiment from the |
| 116 // configuration plist. | 116 // configuration plist. |
| 117 NSString* enableLRUSnapshotCache = | 117 NSString* enableLRUSnapshotCache = |
| 118 [defaults stringForKey:@"SnapshotLRUCache"]; | 118 [defaults stringForKey:@"SnapshotLRUCache"]; |
| 119 if ([enableLRUSnapshotCache isEqualToString:@"Enabled"]) { | 119 if ([enableLRUSnapshotCache isEqualToString:@"Enabled"]) { |
| 120 command_line->AppendSwitch(switches::kEnableLRUSnapshotCache); | 120 command_line->AppendSwitch(switches::kEnableLRUSnapshotCache); |
| 121 } else if ([enableLRUSnapshotCache isEqualToString:@"Disabled"]) { | 121 } else if ([enableLRUSnapshotCache isEqualToString:@"Disabled"]) { |
| 122 command_line->AppendSwitch(switches::kDisableLRUSnapshotCache); | 122 command_line->AppendSwitch(switches::kDisableLRUSnapshotCache); |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Populate command line flag for the AllBookmarks from the | |
| 126 // configuration plist. | |
| 127 NSString* enableAllBookmarks = [defaults stringForKey:@"AllBookmarks"]; | |
| 128 if ([enableAllBookmarks isEqualToString:@"Enabled"]) { | |
| 129 command_line->AppendSwitch(switches::kEnableAllBookmarksView); | |
| 130 } else if ([enableAllBookmarks isEqualToString:@"Disabled"]) { | |
| 131 command_line->AppendSwitch(switches::kDisableAllBookmarksView); | |
| 132 } | |
| 133 | |
| 134 // Populate command line flags from PasswordGenerationEnabled. | 125 // Populate command line flags from PasswordGenerationEnabled. |
| 135 NSString* enablePasswordGenerationValue = | 126 NSString* enablePasswordGenerationValue = |
| 136 [defaults stringForKey:@"PasswordGenerationEnabled"]; | 127 [defaults stringForKey:@"PasswordGenerationEnabled"]; |
| 137 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) { | 128 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) { |
| 138 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration); | 129 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration); |
| 139 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) { | 130 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) { |
| 140 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration); | 131 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration); |
| 141 } | 132 } |
| 142 | 133 |
| 143 // Populate command line flags from PhysicalWebEnabled. | 134 // Populate command line flags from PhysicalWebEnabled. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 339 } |
| 349 | 340 |
| 350 namespace testing { | 341 namespace testing { |
| 351 | 342 |
| 352 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 343 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 353 *count = arraysize(kFeatureEntries); | 344 *count = arraysize(kFeatureEntries); |
| 354 return kFeatureEntries; | 345 return kFeatureEntries; |
| 355 } | 346 } |
| 356 | 347 |
| 357 } // namespace testing | 348 } // namespace testing |
| OLD | NEW |