| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // Add all switches from experimental flags to |command_line|. | 74 // Add all switches from experimental flags to |command_line|. |
| 75 void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) { | 75 void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) { |
| 76 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | 76 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; |
| 77 | 77 |
| 78 // GAIA staging environment. | 78 // GAIA staging environment. |
| 79 NSString* kGAIAEnvironment = @"GAIAEnvironment"; | 79 NSString* kGAIAEnvironment = @"GAIAEnvironment"; |
| 80 NSString* gaia_environment = [defaults stringForKey:kGAIAEnvironment]; | 80 NSString* gaia_environment = [defaults stringForKey:kGAIAEnvironment]; |
| 81 if ([gaia_environment isEqualToString:@"Staging"]) { | 81 if ([gaia_environment isEqualToString:@"Staging"]) { |
| 82 command_line->AppendSwitchASCII(switches::kGaiaUrl, |
| 83 BUILDFLAG(GOOGLE_STAGING_OAUTH_URL)); |
| 82 command_line->AppendSwitchASCII(switches::kGoogleApisUrl, | 84 command_line->AppendSwitchASCII(switches::kGoogleApisUrl, |
| 83 BUILDFLAG(GOOGLE_STAGING_API_URL)); | 85 BUILDFLAG(GOOGLE_STAGING_API_URL)); |
| 84 command_line->AppendSwitchASCII(switches::kLsoUrl, | 86 command_line->AppendSwitchASCII(switches::kLsoUrl, |
| 85 BUILDFLAG(GOOGLE_STAGING_LSO_URL)); | 87 BUILDFLAG(GOOGLE_STAGING_LSO_URL)); |
| 86 } else if ([gaia_environment isEqualToString:@"Test"]) { | 88 } else if ([gaia_environment isEqualToString:@"Test"]) { |
| 87 command_line->AppendSwitchASCII(switches::kGaiaUrl, | 89 command_line->AppendSwitchASCII(switches::kGaiaUrl, |
| 88 BUILDFLAG(GOOGLE_TEST_OAUTH_URL)); | 90 BUILDFLAG(GOOGLE_TEST_OAUTH_URL)); |
| 89 command_line->AppendSwitchASCII(switches::kGoogleApisUrl, | 91 command_line->AppendSwitchASCII(switches::kGoogleApisUrl, |
| 90 BUILDFLAG(GOOGLE_TEST_API_URL)); | 92 BUILDFLAG(GOOGLE_TEST_API_URL)); |
| 91 command_line->AppendSwitchASCII(switches::kLsoUrl, | 93 command_line->AppendSwitchASCII(switches::kLsoUrl, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 320 } |
| 319 | 321 |
| 320 namespace testing { | 322 namespace testing { |
| 321 | 323 |
| 322 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { | 324 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { |
| 323 *count = arraysize(kFeatureEntries); | 325 *count = arraysize(kFeatureEntries); |
| 324 return kFeatureEntries; | 326 return kFeatureEntries; |
| 325 } | 327 } |
| 326 | 328 |
| 327 } // namespace testing | 329 } // namespace testing |
| OLD | NEW |