OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC
Y_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC
Y_PROVIDER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC
Y_PROVIDER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC
Y_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/chromeos/policy/device_local_account.h" | 10 #include "chrome/browser/chromeos/policy/device_local_account.h" |
11 #include "extensions/browser/management_policy.h" | 11 #include "extensions/browser/management_policy.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 // A managed policy for device-local accounts that ensures only extensions whose | 15 // A managed policy for device-local accounts that ensures only extensions whose |
16 // type or ID has been whitelisted for use in device-local accounts can be | 16 // type or ID has been whitelisted for use in device-local accounts can be |
17 // installed. | 17 // installed. |
18 class DeviceLocalAccountManagementPolicyProvider | 18 class DeviceLocalAccountManagementPolicyProvider |
19 : public extensions::ManagementPolicy::Provider { | 19 : public extensions::ManagementPolicy::Provider { |
20 public: | 20 public: |
21 explicit DeviceLocalAccountManagementPolicyProvider( | 21 explicit DeviceLocalAccountManagementPolicyProvider( |
22 policy::DeviceLocalAccount::Type account_type); | 22 policy::DeviceLocalAccount::Type account_type); |
23 virtual ~DeviceLocalAccountManagementPolicyProvider(); | 23 virtual ~DeviceLocalAccountManagementPolicyProvider(); |
24 | 24 |
25 // extensions::ManagementPolicy::Provider: | 25 // extensions::ManagementPolicy::Provider: |
26 virtual std::string GetDebugPolicyProviderName() const OVERRIDE; | 26 virtual std::string GetDebugPolicyProviderName() const override; |
27 virtual bool UserMayLoad(const extensions::Extension* extension, | 27 virtual bool UserMayLoad(const extensions::Extension* extension, |
28 base::string16* error) const OVERRIDE; | 28 base::string16* error) const override; |
29 | 29 |
30 private: | 30 private: |
31 const policy::DeviceLocalAccount::Type account_type_; | 31 const policy::DeviceLocalAccount::Type account_type_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountManagementPolicyProvider); | 33 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountManagementPolicyProvider); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace chromeos | 36 } // namespace chromeos |
37 | 37 |
38 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_PO
LICY_PROVIDER_H_ | 38 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_PO
LICY_PROVIDER_H_ |
OLD | NEW |