Commit 5e84dd0e authored by Jeremy Klein's avatar Jeremy Klein Committed by Commit Bot

Always append sms experiment params to flag-passed urls.

The PWA install API always needs the experiment URL params for now,
but the service worker logic can never have those or stuff breaks.
This change resolves that discrepancy.

Also switch the staging url to point to one that doesn't require
uberproxy because the PWA install API doesn't play well with URLs
that have redirects. This still points to the same actual Messages
code, though.

R=azeemarshad@chromium.org

Bug: 870072
Change-Id: I23f6f0c4d375f2301cfd1b8efb94d36bf88581cf
Reviewed-on: https://chromium-review.googlesource.com/1182868Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Commit-Queue: Jeremy Klein <jlklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584639}
parent e7776d51
......@@ -19,7 +19,7 @@ namespace {
// NOTE: Using internal staging server until changes roll out to prod.
const char kDefaultAndroidMessagesUrl[] =
"https://android-messages-web.corp.google.com";
"https://android-messages.sandbox.google.com/";
// NOTE: Using experiment mods until changes roll out to prod.
const char kExperimentUrlParams[] =
......@@ -28,15 +28,14 @@ const char kExperimentUrlParams[] =
GURL GetURLInternal(bool with_experiments) {
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
GURL android_messages_url(command_line->GetSwitchValueASCII(
switches::kAlternateAndroidMessagesUrl));
if (android_messages_url.is_empty()) {
std::string url_string = std::string(kDefaultAndroidMessagesUrl);
if (with_experiments)
url_string += std::string(kExperimentUrlParams);
android_messages_url = GURL(url_string);
}
return android_messages_url;
std::string url_string =
command_line->GetSwitchValueASCII(switches::kAlternateAndroidMessagesUrl);
if (url_string.empty())
url_string = std::string(kDefaultAndroidMessagesUrl);
if (with_experiments)
url_string += std::string(kExperimentUrlParams);
return GURL(url_string);
}
} // namespace
......
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