Rename GetIconID to GetIconId
[chromium-blink-merge.git] / chrome / browser / extensions / permissions_based_management_policy_provider.h
blobfc8ca72ad688c2947249b9982a696aaba4828503
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDER_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "extensions/browser/management_policy.h"
13 namespace extensions {
15 class Extension;
16 class ExtensionManagement;
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;
28 // ManagementPolicy::Provider implementation.
29 std::string GetDebugPolicyProviderName() const override;
30 bool UserMayLoad(const Extension* extension,
31 base::string16* error) const override;
33 private:
34 ExtensionManagement* settings_;
36 DISALLOW_COPY_AND_ASSIGN(PermissionsBasedManagementPolicyProvider);
39 } // namespace extensions
41 #endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_BASED_MANAGEMENT_POLICY_PROVIDER_H_