Chromium Code Reviews| Index: chrome/browser/extensions/management_policy.cc |
| diff --git a/chrome/browser/extensions/management_policy.cc b/chrome/browser/extensions/management_policy.cc |
| index 710968f9d6b1eace0425c6b71437876a99f3f4ca..2d169cb181c1aa6d5e61b228a6b75a22cde83514 100644 |
| --- a/chrome/browser/extensions/management_policy.cc |
| +++ b/chrome/browser/extensions/management_policy.cc |
| @@ -39,6 +39,13 @@ bool ManagementPolicy::Provider::MustRemainEnabled(const Extension* extension, |
| return false; |
| } |
| +bool ManagementPolicy::Provider::MustRemainDisabled( |
| + const Extension* extension, |
| + Extension::DisableReason* reason, |
| + string16* error) const { |
| + return false; |
| +} |
| + |
| void ManagementPolicy::RegisterProvider(Provider* provider) { |
| providers_.insert(provider); |
| } |
| @@ -65,6 +72,17 @@ bool ManagementPolicy::MustRemainEnabled(const Extension* extension, |
| false, extension, error); |
| } |
| +bool ManagementPolicy::MustRemainDisabled(const Extension* extension, |
| + Extension::DisableReason* reason, |
| + string16* error) const { |
| + for (ProviderList::const_iterator it = providers_.begin(); |
| + it != providers_.end(); ++it) |
| + if ((*it)->MustRemainDisabled(extension, reason, error)) |
| + return true; |
|
miket_OOO
2013/11/04 23:18:10
See any_of. http://www.cplusplus.com/reference/alg
asargent_no_longer_on_chrome
2013/11/05 00:20:44
I looked into it briefly, but it would be very awk
|
| + |
| + return false; |
| +} |
| + |
| void ManagementPolicy::UnregisterAllProviders() { |
| providers_.clear(); |
| } |