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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Populate command line flag for the AllBookmarks from the | 103 // Populate command line flag for the AllBookmarks from the |
104 // configuration plist. | 104 // configuration plist. |
105 NSString* enableAllBookmarks = [defaults stringForKey:@"AllBookmarks"]; | 105 NSString* enableAllBookmarks = [defaults stringForKey:@"AllBookmarks"]; |
106 if ([enableAllBookmarks isEqualToString:@"Enabled"]) { | 106 if ([enableAllBookmarks isEqualToString:@"Enabled"]) { |
107 command_line->AppendSwitch(switches::kEnableAllBookmarksView); | 107 command_line->AppendSwitch(switches::kEnableAllBookmarksView); |
108 } else if ([enableAllBookmarks isEqualToString:@"Disabled"]) { | 108 } else if ([enableAllBookmarks isEqualToString:@"Disabled"]) { |
109 command_line->AppendSwitch(switches::kDisableAllBookmarksView); | 109 command_line->AppendSwitch(switches::kDisableAllBookmarksView); |
110 } | 110 } |
111 | 111 |
112 // Populate command line flag for the NTP favicons experiment from the | |
113 // configuration plist. | |
114 NSString* enableNTPFavicons = [defaults stringForKey:@"EnableNTPFavicons"]; | |
115 if ([enableNTPFavicons isEqualToString:@"Enabled"]) { | |
116 command_line->AppendSwitch(switches::kEnableNTPFavicons); | |
117 } else if ([enableNTPFavicons isEqualToString:@"Disabled"]) { | |
118 command_line->AppendSwitch(switches::kDisableNTPFavicons); | |
119 } | |
120 | |
121 // Populate command line flags from PasswordGenerationEnabled. | 112 // Populate command line flags from PasswordGenerationEnabled. |
122 NSString* enablePasswordGenerationValue = | 113 NSString* enablePasswordGenerationValue = |
123 [defaults stringForKey:@"PasswordGenerationEnabled"]; | 114 [defaults stringForKey:@"PasswordGenerationEnabled"]; |
124 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) { | 115 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) { |
125 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration); | 116 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration); |
126 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) { | 117 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) { |
127 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration); | 118 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration); |
128 } | 119 } |
129 | 120 |
130 // Web page replay flags. | 121 // Web page replay flags. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } | 284 } |
294 | 285 |
295 namespace testing { | 286 namespace testing { |
296 | 287 |
297 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 288 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
298 *count = arraysize(kFeatureEntries); | 289 *count = arraysize(kFeatureEntries); |
299 return kFeatureEntries; | 290 return kFeatureEntries; |
300 } | 291 } |
301 | 292 |
302 } // namespace testing | 293 } // namespace testing |
OLD | NEW |