| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Populate command line flag for the SnapshotLRUCache experiment from the | 93 // Populate command line flag for the SnapshotLRUCache experiment from the |
| 94 // configuration plist. | 94 // configuration plist. |
| 95 NSString* enableLRUSnapshotCache = | 95 NSString* enableLRUSnapshotCache = |
| 96 [defaults stringForKey:@"SnapshotLRUCache"]; | 96 [defaults stringForKey:@"SnapshotLRUCache"]; |
| 97 if ([enableLRUSnapshotCache isEqualToString:@"Enabled"]) { | 97 if ([enableLRUSnapshotCache isEqualToString:@"Enabled"]) { |
| 98 command_line->AppendSwitch(switches::kEnableLRUSnapshotCache); | 98 command_line->AppendSwitch(switches::kEnableLRUSnapshotCache); |
| 99 } else if ([enableLRUSnapshotCache isEqualToString:@"Disabled"]) { | 99 } else if ([enableLRUSnapshotCache isEqualToString:@"Disabled"]) { |
| 100 command_line->AppendSwitch(switches::kDisableLRUSnapshotCache); | 100 command_line->AppendSwitch(switches::kDisableLRUSnapshotCache); |
| 101 } | 101 } |
| 102 | 102 |
| 103 // Populate command line flag for the AllBookmarks from the |
| 104 // configuration plist. |
| 105 NSString* enableAllBookmarks = [defaults stringForKey:@"AllBookmarks"]; |
| 106 if ([enableAllBookmarks isEqualToString:@"Enabled"]) { |
| 107 command_line->AppendSwitch(switches::kEnableAllBookmarksView); |
| 108 } else if ([enableAllBookmarks isEqualToString:@"Disabled"]) { |
| 109 command_line->AppendSwitch(switches::kDisableAllBookmarksView); |
| 110 } |
| 111 |
| 103 // Populate command line flag for the NTP favicons experiment from the | 112 // Populate command line flag for the NTP favicons experiment from the |
| 104 // configuration plist. | 113 // configuration plist. |
| 105 NSString* enableNTPFavicons = [defaults stringForKey:@"EnableNTPFavicons"]; | 114 NSString* enableNTPFavicons = [defaults stringForKey:@"EnableNTPFavicons"]; |
| 106 if ([enableNTPFavicons isEqualToString:@"Enabled"]) { | 115 if ([enableNTPFavicons isEqualToString:@"Enabled"]) { |
| 107 command_line->AppendSwitch(switches::kEnableNTPFavicons); | 116 command_line->AppendSwitch(switches::kEnableNTPFavicons); |
| 108 } else if ([enableNTPFavicons isEqualToString:@"Disabled"]) { | 117 } else if ([enableNTPFavicons isEqualToString:@"Disabled"]) { |
| 109 command_line->AppendSwitch(switches::kDisableNTPFavicons); | 118 command_line->AppendSwitch(switches::kDisableNTPFavicons); |
| 110 } | 119 } |
| 111 | 120 |
| 112 // Populate command line flags from PasswordGenerationEnabled. | 121 // Populate command line flags from PasswordGenerationEnabled. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 293 } |
| 285 | 294 |
| 286 namespace testing { | 295 namespace testing { |
| 287 | 296 |
| 288 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 297 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 289 *count = arraysize(kFeatureEntries); | 298 *count = arraysize(kFeatureEntries); |
| 290 return kFeatureEntries; | 299 return kFeatureEntries; |
| 291 } | 300 } |
| 292 | 301 |
| 293 } // namespace testing | 302 } // namespace testing |
| OLD | NEW |