Commit fd04f155 authored by treib's avatar treib Committed by Commit bot

Supervised users: Add a cmdline flag and about:flags entry to enable the host blacklist

BUG=410824

Review URL: https://codereview.chromium.org/545193003

Cr-Commit-Position: refs/heads/master@{#293740}
parent e9a62602
...@@ -6121,6 +6121,12 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -6121,6 +6121,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION" desc="Description for the flag to enable suggestions service."> <message name="IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION" desc="Description for the flag to enable suggestions service.">
Enable the experimental Chrome suggestions service. Enable the experimental Chrome suggestions service.
</message> </message>
<message name="IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME" desc="Name of the flag to enable the supervised user host blacklist.">
Enable the supervised user host blacklist
</message>
<message name="IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION" desc="Description for the flag to enable the supervised user host blacklist.">
Enable the host blacklist for use by supervised users.
</message>
<message name="IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME" desc="Name of the flag to enable synced notifications."> <message name="IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME" desc="Name of the flag to enable synced notifications.">
Enable Synced Notifications Enable Synced Notifications
</message> </message>
......
...@@ -1169,6 +1169,13 @@ const Experiment kExperiments[] = { ...@@ -1169,6 +1169,13 @@ const Experiment kExperiments[] = {
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService, ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSuggestionsService,
switches::kDisableSuggestionsService) switches::kDisableSuggestionsService)
}, },
{
"enable-supervised-user-blacklist",
IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_NAME,
IDS_FLAGS_ENABLE_SUPERVISED_USER_BLACKLIST_DESCRIPTION,
kOsAndroid | kOsMac | kOsWin | kOsLinux | kOsCrOS,
SINGLE_VALUE_TYPE(switches::kEnableSupervisedUserBlacklist)
},
{ {
"enable-sync-synced-notifications", "enable-sync-synced-notifications",
IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME, IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
......
...@@ -715,7 +715,10 @@ void SupervisedUserService::SetActive(bool active) { ...@@ -715,7 +715,10 @@ void SupervisedUserService::SetActive(bool active) {
UpdateSiteLists(); UpdateSiteLists();
UpdateManualHosts(); UpdateManualHosts();
UpdateManualURLs(); UpdateManualURLs();
if (delegate_) { bool use_blacklist =
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableSupervisedUserBlacklist);
if (delegate_ && use_blacklist) {
base::FilePath blacklist_path = delegate_->GetBlacklistPath(); base::FilePath blacklist_path = delegate_->GetBlacklistPath();
if (!blacklist_path.empty()) if (!blacklist_path.empty())
LoadBlacklist(blacklist_path); LoadBlacklist(blacklist_path);
......
...@@ -604,6 +604,10 @@ const char kEnableStreamlinedHostedApps[] = "enable-streamlined-hosted-apps"; ...@@ -604,6 +604,10 @@ const char kEnableStreamlinedHostedApps[] = "enable-streamlined-hosted-apps";
// Enables the suggestions service. // Enables the suggestions service.
const char kEnableSuggestionsService[] = "enable-suggestions-service"; const char kEnableSuggestionsService[] = "enable-suggestions-service";
// Enables the supervised user host blacklist.
const char kEnableSupervisedUserBlacklist[] =
"enable-supervised-user-blacklist";
// Enables synced notifications. // Enables synced notifications.
const char kEnableSyncSyncedNotifications[] = const char kEnableSyncSyncedNotifications[] =
"enable-sync-synced-notifications"; "enable-sync-synced-notifications";
......
...@@ -174,6 +174,7 @@ extern const char kEnableSpellingFeedbackFieldTrial[]; ...@@ -174,6 +174,7 @@ extern const char kEnableSpellingFeedbackFieldTrial[];
extern const char kEnableSSLConnectJobWaiting[]; extern const char kEnableSSLConnectJobWaiting[];
extern const char kEnableStreamlinedHostedApps[]; extern const char kEnableStreamlinedHostedApps[];
extern const char kEnableSuggestionsService[]; extern const char kEnableSuggestionsService[];
extern const char kEnableSupervisedUserBlacklist[];
extern const char kEnableSyncArticles[]; extern const char kEnableSyncArticles[];
extern const char kEnableSyncSyncedNotifications[]; extern const char kEnableSyncSyncedNotifications[];
extern const char kEnableThumbnailRetargeting[]; extern const char kEnableThumbnailRetargeting[];
......
...@@ -44295,6 +44295,7 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -44295,6 +44295,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="-1399419572" label="enable-app-list"/> <int value="-1399419572" label="enable-app-list"/>
<int value="-1392562498" label="disable-origin-chip"/> <int value="-1392562498" label="disable-origin-chip"/>
<int value="-1375111024" label="enable-fixed-position-compositing"/> <int value="-1375111024" label="enable-fixed-position-compositing"/>
<int value="-1358669137" label="enable-supervised-user-blacklist"/>
<int value="-1349872906" <int value="-1349872906"
label="disallow-autofill-sync-credential-for-reauth"/> label="disallow-autofill-sync-credential-for-reauth"/>
<int value="-1341092934" label="enable-accelerated-overflow-scroll"/> <int value="-1341092934" label="enable-accelerated-overflow-scroll"/>
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