1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_
10 #include "base/strings/string16.h"
11 #include "extensions/browser/management_policy.h"
13 namespace extensions
{
17 class ExtensionManagement
;
19 // The standard management policy provider, which takes into account the
20 // extension black/whitelists and admin black/whitelists.
21 class StandardManagementPolicyProvider
: public ManagementPolicy::Provider
{
23 explicit StandardManagementPolicyProvider(
24 const ExtensionManagement
* settings
);
26 ~StandardManagementPolicyProvider() override
;
28 // ManagementPolicy::Provider implementation.
29 std::string
GetDebugPolicyProviderName() const override
;
30 bool UserMayLoad(const Extension
* extension
,
31 base::string16
* error
) const override
;
32 bool UserMayModifySettings(const Extension
* extension
,
33 base::string16
* error
) const override
;
34 bool MustRemainEnabled(const Extension
* extension
,
35 base::string16
* error
) const override
;
36 bool MustRemainDisabled(const Extension
* extension
,
37 Extension::DisableReason
* reason
,
38 base::string16
* error
) const override
;
39 bool MustRemainInstalled(const Extension
* extension
,
40 base::string16
* error
) const override
;
43 const ExtensionManagement
* settings_
;
46 } // namespace extensions
48 #endif // CHROME_BROWSER_EXTENSIONS_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_