1 // Copyright 2013 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 EXTENSIONS_BROWSER_ADMIN_POLICY_H_
6 #define EXTENSIONS_BROWSER_ADMIN_POLICY_H_
8 #include "base/values.h"
10 namespace extensions
{
14 // Functions for providing information about the extension whitelist,
15 // blacklist, and forcelist imposed by admin policy.
16 namespace admin_policy
{
18 // Checks if extensions are blacklisted by default, by policy. When true, this
19 // means that even extensions without an ID should be blacklisted (e.g.
20 // from the command line, or when loaded as an unpacked extension).
21 bool BlacklistedByDefault(const base::ListValue
* blacklist
);
23 // Returns true if the extension is allowed by the admin policy.
24 bool UserMayLoad(const base::ListValue
* blacklist
,
25 const base::ListValue
* whitelist
,
26 const base::DictionaryValue
* forcelist
,
27 const base::ListValue
* allowed_types
,
28 const Extension
* extension
,
29 base::string16
* error
);
31 // Returns false if the extension is required to remain running. In practice
32 // this enforces the admin policy forcelist.
33 bool UserMayModifySettings(const Extension
* extension
, base::string16
* error
);
35 // Returns false if the extension is required to remain running. In practice
36 // this enforces the admin policy forcelist.
37 bool MustRemainEnabled(const Extension
* extension
, base::string16
* error
);
39 } // namespace admin_policy
40 } // namespace extensions
42 #endif // EXTENSIONS_BROWSER_ADMIN_POLICY_H_