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

Side by Side Diff: chrome/browser/extensions/permissions_based_management_policy_provider.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: fix memory leaks Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDER_H _
6 #define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDER_H _
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "extensions/browser/management_policy.h"
12
13 namespace extensions {
14
15 class Extension;
16 class ExtensionManagement;
17
18 // A ManagementPolicyProvider controlled by enterprise policy, and prevent
19 // certain extensions from loading by checking if its permission data conflicts
20 // with policy or not.
21 class PermissionsBasedManagementPolicyProvider
22 : public ManagementPolicy::Provider {
23 public:
24 explicit PermissionsBasedManagementPolicyProvider(
25 ExtensionManagement* settings);
26 ~PermissionsBasedManagementPolicyProvider() override;
27
28 // ManagementPolicy::Provider implementation.
29 std::string GetDebugPolicyProviderName() const override;
30 bool UserMayLoad(const Extension* extension,
31 base::string16* error) const override;
32
33 private:
34 ExtensionManagement* settings_;
35
36 DISALLOW_COPY_AND_ASSIGN(PermissionsBasedManagementPolicyProvider);
37 };
38
39 } // namespace extensions
40
41 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698