Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / extensions / standard_management_policy_provider.h
blob45d4adc08eb6d1bc93a2f7135f6bc444fa90f28a
1 // Copyright 2012 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_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_EXTENSIONS_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_
8 #include "extensions/browser/management_policy.h"
10 namespace extensions {
12 class Blacklist;
13 class Extension;
14 class ExtensionPrefs;
16 // The standard management policy provider, which takes into account the
17 // extension black/whitelists and admin black/whitelists.
18 class StandardManagementPolicyProvider : public ManagementPolicy::Provider {
19 public:
20 // |prefs| must outlive this.
21 explicit StandardManagementPolicyProvider(ExtensionPrefs* prefs);
23 virtual ~StandardManagementPolicyProvider();
25 // ManagementPolicy::Provider implementation.
26 virtual std::string GetDebugPolicyProviderName() const OVERRIDE;
27 virtual bool UserMayLoad(const Extension* extension,
28 base::string16* error) const OVERRIDE;
29 virtual bool UserMayModifySettings(const Extension* extension,
30 base::string16* error) const OVERRIDE;
31 virtual bool MustRemainEnabled(const Extension* extension,
32 base::string16* error) const OVERRIDE;
34 private:
35 ExtensionPrefs* const prefs_;
38 } // namespace extensions
40 #endif // CHROME_BROWSER_EXTENSIONS_STANDARD_MANAGEMENT_POLICY_PROVIDER_H_