Index: extensions/browser/test_management_policy.cc |
diff --git a/extensions/browser/test_management_policy.cc b/extensions/browser/test_management_policy.cc |
index 77ec19132f2a09db6fe54d4173dc29a9c4806d38..839fde6dc99b3c0c0034785a9b3fd47f56c2ee4b 100644 |
--- a/extensions/browser/test_management_policy.cc |
+++ b/extensions/browser/test_management_policy.cc |
@@ -13,6 +13,7 @@ TestManagementPolicyProvider::TestManagementPolicyProvider() |
may_modify_status_(true), |
must_remain_enabled_(false), |
must_remain_disabled_(false), |
+ must_remain_installed_(false), |
disable_reason_(Extension::DISABLE_NONE) { |
error_message_ = base::UTF8ToUTF16(expected_error()); |
} |
@@ -29,6 +30,7 @@ void TestManagementPolicyProvider::SetProhibitedActions( |
may_modify_status_ = (prohibited_actions & PROHIBIT_MODIFY_STATUS) == 0; |
must_remain_enabled_ = (prohibited_actions & MUST_REMAIN_ENABLED) != 0; |
must_remain_disabled_ = (prohibited_actions & MUST_REMAIN_DISABLED) != 0; |
+ must_remain_installed_ = (prohibited_actions & MUST_REMAIN_INSTALLED) != 0; |
} |
void TestManagementPolicyProvider::SetDisableReason( |
@@ -75,5 +77,12 @@ bool TestManagementPolicyProvider::MustRemainDisabled( |
return must_remain_disabled_; |
} |
+bool TestManagementPolicyProvider::MustRemainInstalled( |
+ const Extension* extension, |
+ base::string16* error) const { |
+ if (error && must_remain_installed_) |
+ *error = error_message_; |
+ return must_remain_installed_; |
+} |
} // namespace extensions |