Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/extensions/admin_policy.h

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and merged Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/admin_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 class Extension; 12 class Extension;
13 } 13 }
14 14
15 // Functions for providing information about the extension whitelist, 15 // Functions for providing information about the extension whitelist,
16 // blacklist, and forcelist imposed by admin policy. 16 // blacklist, and forcelist imposed by admin policy.
17 namespace extensions { 17 namespace extensions {
18 namespace admin_policy { 18 namespace admin_policy {
19 19
20 // Checks if extensions are blacklisted by default, by policy. When true, this 20 // Checks if extensions are blacklisted by default, by policy. When true, this
21 // means that even extensions without an ID should be blacklisted (e.g. 21 // means that even extensions without an ID should be blacklisted (e.g.
22 // from the command line, or when loaded as an unpacked extension). 22 // from the command line, or when loaded as an unpacked extension).
23 bool BlacklistedByDefault(const base::ListValue* blacklist); 23 bool BlacklistedByDefault(const base::ListValue* blacklist);
24 24
25 // Returns true if the extension is allowed by admin policy white- and 25 // Returns true if the extension is allowed by Google blacklist and admin policy
26 // blacklists. 26 // white-, black- and forcelists.
27 bool UserMayLoad(const base::ListValue* blacklist, 27 bool UserMayLoad(bool is_google_blacklisted,
28 const base::ListValue* blacklist,
28 const base::ListValue* whitelist, 29 const base::ListValue* whitelist,
30 const base::ListValue* forcelist,
29 const Extension* extension, 31 const Extension* extension,
30 string16* error); 32 string16* error);
31 33
32 // Returns false if the extension is required to remain running. In practice 34 // Returns false if the extension is required to remain running. In practice
33 // this enforces the admin policy forcelist. 35 // this enforces the admin policy forcelist.
34 bool UserMayModifySettings(const Extension* extension, string16* error); 36 bool UserMayModifySettings(const Extension* extension, string16* error);
35 37
36 // Returns false if the extension is required to remain running. In practice 38 // Returns false if the extension is required to remain running. In practice
37 // this enforces the admin policy forcelist. 39 // this enforces the admin policy forcelist.
38 bool MustRemainEnabled(const Extension* extension, string16* error); 40 bool MustRemainEnabled(const Extension* extension, string16* error);
39 41
40 } // namespace 42 } // namespace
41 } // namespace 43 } // namespace
42 44
43 #endif // CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_ 45 #endif // CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/admin_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698