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

Side by Side Diff: extensions/browser/management_policy.h

Issue 595363002: Add policy controlled permission block list for extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-fix
Patch Set: more minor format fix Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_ 5 #ifndef EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_
6 #define EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_ 6 #define EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "extensions/common/extension.h" 13 #include "extensions/common/extension.h"
13 14
14 namespace extensions { 15 namespace extensions {
15 16
16 // This class registers providers that want to prohibit certain actions from 17 // This class registers providers that want to prohibit certain actions from
17 // being applied to extensions. It must be called, via the ExtensionService, 18 // being applied to extensions. It must be called, via the ExtensionService,
18 // before allowing a user or a user-level mechanism to perform the respective 19 // before allowing a user or a user-level mechanism to perform the respective
19 // action. (That is, installing or otherwise modifying an extension in order 20 // action. (That is, installing or otherwise modifying an extension in order
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 ManagementPolicy(); 82 ManagementPolicy();
82 ~ManagementPolicy(); 83 ~ManagementPolicy();
83 84
84 // Registers or unregisters a provider, causing it to be added to or removed 85 // Registers or unregisters a provider, causing it to be added to or removed
85 // from the list of providers queried. Ownership of the provider remains with 86 // from the list of providers queried. Ownership of the provider remains with
86 // the caller. Providers do not need to be unregistered on shutdown. 87 // the caller. Providers do not need to be unregistered on shutdown.
87 void RegisterProvider(Provider* provider); 88 void RegisterProvider(Provider* provider);
88 void UnregisterProvider(Provider* provider); 89 void UnregisterProvider(Provider* provider);
89 90
91 // Like RegisterProvider(), but registers multiple providers instead.
92 void RegisterProviders(std::vector<Provider*> providers);
93
90 // Returns true if the user is permitted to install, load, and run the given 94 // Returns true if the user is permitted to install, load, and run the given
91 // extension. If not, |error| may be set to an appropriate message. 95 // extension. If not, |error| may be set to an appropriate message.
92 bool UserMayLoad(const Extension* extension, base::string16* error) const; 96 bool UserMayLoad(const Extension* extension, base::string16* error) const;
93 97
94 // Returns true if the user is permitted to enable, disable, or uninstall the 98 // Returns true if the user is permitted to enable, disable, or uninstall the
95 // given extension, or change the extension's usage options (incognito mode, 99 // given extension, or change the extension's usage options (incognito mode,
96 // file access, etc.). If not, |error| may be set to an appropriate message. 100 // file access, etc.). If not, |error| may be set to an appropriate message.
97 bool UserMayModifySettings(const Extension* extension, 101 bool UserMayModifySettings(const Extension* extension,
98 base::string16* error) const; 102 base::string16* error) const;
99 103
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::string16* error) const; 137 base::string16* error) const;
134 138
135 ProviderList providers_; 139 ProviderList providers_;
136 140
137 DISALLOW_COPY_AND_ASSIGN(ManagementPolicy); 141 DISALLOW_COPY_AND_ASSIGN(ManagementPolicy);
138 }; 142 };
139 143
140 } // namespace extensions 144 } // namespace extensions
141 145
142 #endif // EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_ 146 #endif // EXTENSIONS_BROWSER_MANAGEMENT_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698