Commit 18ad0a98 authored by Chris Lu's avatar Chris Lu Committed by Chromium LUCI CQ

[ios] Add new Experimental Flag for an alternate Discover Server URL

This URL will be used to test Discover Feed server changes on a client.

Bug: 1169382
Change-Id: I3fa1d7ccdb380ecfd295985d771bc9a44acf793f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643094
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845878}
parent b8459c64
...@@ -4,6 +4,24 @@ ...@@ -4,6 +4,24 @@
<dict> <dict>
<key>PreferenceSpecifiers</key> <key>PreferenceSpecifiers</key>
<array> <array>
<dict>
<key>Title</key>
<string>Discover Feed</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>DiscoverFeed Server URL</string>
<key>Key</key>
<string>AlternateDiscoverFeedServerURL</string>
<key>DefaultValue</key>
<string></string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict> <dict>
<key>Type</key> <key>Type</key>
<string>PSGroupSpecifier</string> <string>PSGroupSpecifier</string>
......
...@@ -44,6 +44,9 @@ std::string GetOriginServerHost(); ...@@ -44,6 +44,9 @@ std::string GetOriginServerHost();
// If |WHATS_NEW_DEFAULT| is returned, no promo is force enabled. // If |WHATS_NEW_DEFAULT| is returned, no promo is force enabled.
WhatsNewPromoStatus GetWhatsNewPromoStatus(); WhatsNewPromoStatus GetWhatsNewPromoStatus();
// Returns the URL for the alternative Discover Feed server.
std::string getAlternateDiscoverFeedServerURL();
// Whether memory debugging tools are enabled. // Whether memory debugging tools are enabled.
bool IsMemoryDebuggingEnabled(); bool IsMemoryDebuggingEnabled();
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
namespace { namespace {
NSString* const kAlternateDiscoverFeedServerURL =
@"AlternateDiscoverFeedServerURL";
NSString* const kDisableDCHECKCrashes = @"DisableDCHECKCrashes"; NSString* const kDisableDCHECKCrashes = @"DisableDCHECKCrashes";
NSString* const kEnableStartupCrash = @"EnableStartupCrash"; NSString* const kEnableStartupCrash = @"EnableStartupCrash";
NSString* const kFirstRunForceEnabled = @"FirstRunForceEnabled"; NSString* const kFirstRunForceEnabled = @"FirstRunForceEnabled";
...@@ -81,6 +83,12 @@ WhatsNewPromoStatus GetWhatsNewPromoStatus() { ...@@ -81,6 +83,12 @@ WhatsNewPromoStatus GetWhatsNewPromoStatus() {
return static_cast<WhatsNewPromoStatus>(status); return static_cast<WhatsNewPromoStatus>(status);
} }
std::string getAlternateDiscoverFeedServerURL() {
NSString* alternateServerURL = [[NSUserDefaults standardUserDefaults]
stringForKey:kAlternateDiscoverFeedServerURL];
return base::SysNSStringToUTF8(alternateServerURL);
}
bool IsMemoryDebuggingEnabled() { bool IsMemoryDebuggingEnabled() {
// Always return true for Chromium builds, but check the user default for // Always return true for Chromium builds, but check the user default for
// official builds because memory debugging should never be enabled on stable. // official builds because memory debugging should never be enabled on stable.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment