| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 command_line->AppendSwitch(switches::kEnableBookmarkReordering); | 279 command_line->AppendSwitch(switches::kEnableBookmarkReordering); |
| 280 } else if ([enableBookmarkReordering isEqualToString:@"Disabled"]) { | 280 } else if ([enableBookmarkReordering isEqualToString:@"Disabled"]) { |
| 281 command_line->AppendSwitch(switches::kDisableBookmarkReordering); | 281 command_line->AppendSwitch(switches::kDisableBookmarkReordering); |
| 282 } | 282 } |
| 283 | 283 |
| 284 // Populate command line flag for the request mobile site experiment from the | 284 // Populate command line flag for the request mobile site experiment from the |
| 285 // configuration plist. | 285 // configuration plist. |
| 286 if ([defaults boolForKey:@"RequestMobileSiteDisabled"]) | 286 if ([defaults boolForKey:@"RequestMobileSiteDisabled"]) |
| 287 command_line->AppendSwitch(switches::kDisableRequestMobileSite); | 287 command_line->AppendSwitch(switches::kDisableRequestMobileSite); |
| 288 | 288 |
| 289 // Populate command line flag for 3rd party keyboard omnibox workaround. |
| 290 NSString* enableThirdPartyKeyboardWorkaround = |
| 291 [defaults stringForKey:@"EnableThirdPartyKeyboardWorkaround"]; |
| 292 if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Enabled"]) { |
| 293 command_line->AppendSwitch(switches::kEnableThirdPartyKeyboardWorkaround); |
| 294 } else if ([enableThirdPartyKeyboardWorkaround isEqualToString:@"Disabled"]) { |
| 295 command_line->AppendSwitch(switches::kDisableThirdPartyKeyboardWorkaround); |
| 296 } |
| 297 |
| 289 ios::GetChromeBrowserProvider()->AppendSwitchesFromExperimentalSettings( | 298 ios::GetChromeBrowserProvider()->AppendSwitchesFromExperimentalSettings( |
| 290 defaults, command_line); | 299 defaults, command_line); |
| 291 } | 300 } |
| 292 | 301 |
| 293 bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { | 302 bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { |
| 294 return false; | 303 return false; |
| 295 } | 304 } |
| 296 | 305 |
| 297 class FlagsStateSingleton { | 306 class FlagsStateSingleton { |
| 298 public: | 307 public: |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 360 } |
| 352 | 361 |
| 353 namespace testing { | 362 namespace testing { |
| 354 | 363 |
| 355 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 364 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 356 *count = arraysize(kFeatureEntries); | 365 *count = arraysize(kFeatureEntries); |
| 357 return kFeatureEntries; | 366 return kFeatureEntries; |
| 358 } | 367 } |
| 359 | 368 |
| 360 } // namespace testing | 369 } // namespace testing |
| OLD | NEW |