| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 command_line->AppendSwitchASCII(switches::kLsoUrl, | 91 command_line->AppendSwitchASCII(switches::kLsoUrl, |
| 92 BUILDFLAG(GOOGLE_TEST_LSO_URL)); | 92 BUILDFLAG(GOOGLE_TEST_LSO_URL)); |
| 93 command_line->AppendSwitchASCII(switches::kSyncServiceURL, | 93 command_line->AppendSwitchASCII(switches::kSyncServiceURL, |
| 94 BUILDFLAG(GOOGLE_TEST_SYNC_URL)); | 94 BUILDFLAG(GOOGLE_TEST_SYNC_URL)); |
| 95 command_line->AppendSwitchASCII(switches::kOAuth2ClientID, | 95 command_line->AppendSwitchASCII(switches::kOAuth2ClientID, |
| 96 BUILDFLAG(GOOGLE_TEST_OAUTH_CLIENT_ID)); | 96 BUILDFLAG(GOOGLE_TEST_OAUTH_CLIENT_ID)); |
| 97 command_line->AppendSwitchASCII(switches::kOAuth2ClientSecret, | 97 command_line->AppendSwitchASCII(switches::kOAuth2ClientSecret, |
| 98 BUILDFLAG(GOOGLE_TEST_OAUTH_CLIENT_SECRET)); | 98 BUILDFLAG(GOOGLE_TEST_OAUTH_CLIENT_SECRET)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Populate command line flag for the tab strip auto scroll new tabs |
| 102 // experiment from the configuration plist. |
| 103 if ([defaults boolForKey:@"TabStripAutoScrollNewTabsDisabled"]) |
| 104 command_line->AppendSwitch(switches::kDisableTabStripAutoScrollNewTabs); |
| 105 |
| 101 // Populate command line flag for the Tab Switcher experiment from the | 106 // Populate command line flag for the Tab Switcher experiment from the |
| 102 // configuration plist. | 107 // configuration plist. |
| 103 NSString* enableTabSwitcher = [defaults stringForKey:@"EnableTabSwitcher"]; | 108 NSString* enableTabSwitcher = [defaults stringForKey:@"EnableTabSwitcher"]; |
| 104 if ([enableTabSwitcher isEqualToString:@"Enabled"]) { | 109 if ([enableTabSwitcher isEqualToString:@"Enabled"]) { |
| 105 command_line->AppendSwitch(switches::kEnableTabSwitcher); | 110 command_line->AppendSwitch(switches::kEnableTabSwitcher); |
| 106 } else if ([enableTabSwitcher isEqualToString:@"Disabled"]) { | 111 } else if ([enableTabSwitcher isEqualToString:@"Disabled"]) { |
| 107 command_line->AppendSwitch(switches::kDisableTabSwitcher); | 112 command_line->AppendSwitch(switches::kDisableTabSwitcher); |
| 108 } | 113 } |
| 109 | 114 |
| 110 // Populate command line flag for the SnapshotLRUCache experiment from the | 115 // Populate command line flag for the SnapshotLRUCache experiment from the |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 } | 343 } |
| 339 | 344 |
| 340 namespace testing { | 345 namespace testing { |
| 341 | 346 |
| 342 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 347 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 343 *count = arraysize(kFeatureEntries); | 348 *count = arraysize(kFeatureEntries); |
| 344 return kFeatureEntries; | 349 return kFeatureEntries; |
| 345 } | 350 } |
| 346 | 351 |
| 347 } // namespace testing | 352 } // namespace testing |
| OLD | NEW |