Commit b4dadfad authored by Toby Huang's avatar Toby Huang Committed by Commit Bot

Remove unneeded enum CONTROLLER_TYPE_CHILD_CUSTODIAN

Add a TODO comment to fix the logic in
ExtensionSyncService::HasPendingReenable() in the future. This is a
follow-up CL to address the remaining issues in the prematurely
committed crrev.com/c/1861280.

Bug: 1019813
Change-Id: I00a57eaa4f04d64a34902240ce0e31fe8cbeddeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890726Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Toby Huang <tobyhuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715087}
parent ffbce71f
......@@ -2134,9 +2134,10 @@ TEST_F(ExtensionServiceTestSupervised,
// The re-enable should be delayed until the extension is updated to the
// matching version.
EXPECT_FALSE(registry()->enabled_extensions().Contains(id));
// The logic for HasPendingReenable() is broken since
// TODO(crbug/1019813): The logic for HasPendingReenable() is broken since
// DISABLE_CUSTODIAN_APPROVAL_REQUIRED cannot be a syncable disable reason.
// The expectation below is supposed to return true but returns false for now.
// Fix the behavior of HasPendingReenable().
EXPECT_FALSE(extension_sync_service()->HasPendingReenable(
id, base::Version(version3)));
......
......@@ -53,6 +53,12 @@ class ExtensionSyncService : public syncer::SyncableService,
// it is updated to the given |version|. This happens when we get a Sync
// update telling us to re-enable a newer version than what is currently
// installed.
// TODO(crbug/1019813): The logic for this function was broken after forced
// custodian installations were removed. See
// ExtensionServiceTestSupervised.
// UpdateWithPermissionIncreaseApprovalNewVersion
// for an example of when this function should return true but returns false
// instead in the test code.
bool HasPendingReenable(const std::string& id,
const base::Version& version) const;
......
......@@ -329,8 +329,6 @@ Polymer({
switch (type) {
case 'POLICY':
return 'cr20:domain';
case 'CHILD_CUSTODIAN':
return 'cr:account-child-invert';
case 'SUPERVISED_USER_CUSTODIAN':
return 'cr:supervisor-account';
default:
......
......@@ -773,9 +773,8 @@ bool SupervisedUserService::MustRemainDisabled(
if (must_remain_disabled) {
if (error)
*error = GetExtensionsLockedMessage();
// If the extension must remain disabled due to permission increase,
// then the update request has been already sent at update time.
// We do nothing and we don't add an extra disable reason.
// If the extension must remain disabled due to permission increase, then we
// do nothing and we don't add an extra disable reason.
ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(profile_);
if (extension_prefs->HasDisableReason(
extension->id(),
......
......@@ -160,7 +160,6 @@ namespace developerPrivate {
enum ControllerType {
POLICY,
CHILD_CUSTODIAN,
SUPERVISED_USER_CUSTODIAN
};
......
......@@ -219,7 +219,6 @@ chrome.developerPrivate.ExtensionView;
*/
chrome.developerPrivate.ControllerType = {
POLICY: 'POLICY',
CHILD_CUSTODIAN: 'CHILD_CUSTODIAN',
SUPERVISED_USER_CUSTODIAN: 'SUPERVISED_USER_CUSTODIAN',
};
......
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