Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: ios/chrome/browser/about_flags.mm

Issue 2088993005: Add Physical Web experiment and command line flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Populate command line flags from PasswordGenerationEnabled. 112 // Populate command line flags from PasswordGenerationEnabled.
113 NSString* enablePasswordGenerationValue = 113 NSString* enablePasswordGenerationValue =
114 [defaults stringForKey:@"PasswordGenerationEnabled"]; 114 [defaults stringForKey:@"PasswordGenerationEnabled"];
115 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) { 115 if ([enablePasswordGenerationValue isEqualToString:@"Enabled"]) {
116 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration); 116 command_line->AppendSwitch(switches::kEnableIOSPasswordGeneration);
117 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) { 117 } else if ([enablePasswordGenerationValue isEqualToString:@"Disabled"]) {
118 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration); 118 command_line->AppendSwitch(switches::kDisableIOSPasswordGeneration);
119 } 119 }
120 120
121 // Populate command line flags from PhysicalWebEnabled.
122 NSString* enablePhysicalWebValue =
123 [defaults stringForKey:@"PhysicalWebEnabled"];
124 if ([enablePhysicalWebValue isEqualToString:@"Enabled"]) {
125 command_line->AppendSwitch(switches::kEnableIOSPhysicalWeb);
126 } else if ([enablePhysicalWebValue isEqualToString:@"Disabled"]) {
127 command_line->AppendSwitch(switches::kDisableIOSPhysicalWeb);
128 }
129
121 // Web page replay flags. 130 // Web page replay flags.
122 BOOL webPageReplayEnabled = [defaults boolForKey:@"WebPageReplayEnabled"]; 131 BOOL webPageReplayEnabled = [defaults boolForKey:@"WebPageReplayEnabled"];
123 NSString* webPageReplayProxy = 132 NSString* webPageReplayProxy =
124 [defaults stringForKey:@"WebPageReplayProxyAddress"]; 133 [defaults stringForKey:@"WebPageReplayProxyAddress"];
125 if (webPageReplayEnabled && [webPageReplayProxy length]) { 134 if (webPageReplayEnabled && [webPageReplayProxy length]) {
126 command_line->AppendSwitch(switches::kIOSIgnoreCertificateErrors); 135 command_line->AppendSwitch(switches::kIOSIgnoreCertificateErrors);
127 // 80 and 443 are the default ports from web page replay. 136 // 80 and 443 are the default ports from web page replay.
128 command_line->AppendSwitchASCII(switches::kIOSTestingFixedHttpPort, "80"); 137 command_line->AppendSwitchASCII(switches::kIOSTestingFixedHttpPort, "80");
129 command_line->AppendSwitchASCII(switches::kIOSTestingFixedHttpsPort, "443"); 138 command_line->AppendSwitchASCII(switches::kIOSTestingFixedHttpsPort, "443");
130 command_line->AppendSwitchASCII( 139 command_line->AppendSwitchASCII(
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/chrome_switches.h » ('j') | ios/chrome/browser/experimental_flags.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698