Commit c422eb15 authored by Michael Giuffrida's avatar Michael Giuffrida Committed by Commit Bot

Add DE and JP to Demo Mode setup flow

Add Germany and Japan to country selector during Demo Mode setup and
enroll the device into the corresponding OU.

I've already created the corresponding admin-de and admin-jp users and
OUs in the admin console and verified that enrolling into either of
these countries works.

Bug: 983278
Test: Start Demo Mode setup at Welcome screen; set up using Germany or Japan

Change-Id: Ie2dbef900546fc5efb3638556c069c92d9d6f045
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699195Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678453}
parent 97166b1c
......@@ -73,9 +73,15 @@ class DemoSession : public session_manager::SessionManagerObserver,
kMaxValue = kExtensionApi
};
// The list of countries that Demo Mode supports.
// The list of countries that Demo Mode supports, ie the countries we have
// created OUs and admin users for in the admin console.
// Sorted by the English name of the country (not the country code), except US
// is first.
// TODO(crbug.com/983359): Sort these by country name in the current locale
// instead of using this hard-coded US-centric order.
static constexpr char kSupportedCountries[][3] = {
"us", "be", "ca", "dk", "fi", "fr", "ie", "lu", "nl", "no", "se", "gb"};
"us", "be", "ca", "dk", "fi", "fr", "de",
"ie", "jp", "lu", "nl", "no", "se", "gb"};
static std::string DemoConfigToString(DemoModeConfig config);
......
......@@ -604,7 +604,9 @@ IN_PROC_BROWSER_TEST_F(DemoSetupTest,
{"dk", "Denmark"},
{"fi", "Finland"},
{"fr", "France"},
{"de", "Germany"},
{"ie", "Ireland"},
{"jp", "Japan"},
{"lu", "Luxembourg"},
{"nl", "Netherlands"},
{"no", "Norway"},
......
......@@ -470,7 +470,7 @@ std::string DemoSetupController::GetSubOrganizationEmail() {
const std::string country =
g_browser_process->local_state()->GetString(prefs::kDemoModeCountry);
const base::flat_set<std::string> kCountriesWithCustomization(
{"dk", "fi", "fr", "nl", "no", "se"});
{"de", "dk", "fi", "fr", "jp", "nl", "no", "se"});
if (kCountriesWithCustomization.contains(country))
return "admin-" + country + "@" + policy::kDemoModeDomain;
return std::string();
......
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