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 EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ | 5 #ifndef EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ |
6 #define EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ | 6 #define EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static std::string expected_error() { | 28 static std::string expected_error() { |
29 return "Action prohibited by test provider."; | 29 return "Action prohibited by test provider."; |
30 } | 30 } |
31 | 31 |
32 TestManagementPolicyProvider(); | 32 TestManagementPolicyProvider(); |
33 explicit TestManagementPolicyProvider(int prohibited_actions); | 33 explicit TestManagementPolicyProvider(int prohibited_actions); |
34 | 34 |
35 void SetProhibitedActions(int prohibited_actions); | 35 void SetProhibitedActions(int prohibited_actions); |
36 void SetDisableReason(Extension::DisableReason reason); | 36 void SetDisableReason(Extension::DisableReason reason); |
37 | 37 |
38 virtual std::string GetDebugPolicyProviderName() const override; | 38 std::string GetDebugPolicyProviderName() const override; |
39 | 39 |
40 virtual bool UserMayLoad(const Extension* extension, | 40 bool UserMayLoad(const Extension* extension, |
| 41 base::string16* error) const override; |
| 42 |
| 43 bool UserMayModifySettings(const Extension* extension, |
| 44 base::string16* error) const override; |
| 45 |
| 46 bool MustRemainEnabled(const Extension* extension, |
| 47 base::string16* error) const override; |
| 48 |
| 49 bool MustRemainDisabled(const Extension* extension, |
| 50 Extension::DisableReason* reason, |
| 51 base::string16* error) const override; |
| 52 |
| 53 bool MustRemainInstalled(const Extension* extension, |
41 base::string16* error) const override; | 54 base::string16* error) const override; |
42 | 55 |
43 virtual bool UserMayModifySettings(const Extension* extension, | |
44 base::string16* error) const override; | |
45 | |
46 virtual bool MustRemainEnabled(const Extension* extension, | |
47 base::string16* error) const override; | |
48 | |
49 virtual bool MustRemainDisabled(const Extension* extension, | |
50 Extension::DisableReason* reason, | |
51 base::string16* error) const override; | |
52 | |
53 virtual bool MustRemainInstalled(const Extension* extension, | |
54 base::string16* error) const override; | |
55 | |
56 private: | 56 private: |
57 bool may_load_; | 57 bool may_load_; |
58 bool may_modify_status_; | 58 bool may_modify_status_; |
59 bool must_remain_enabled_; | 59 bool must_remain_enabled_; |
60 bool must_remain_disabled_; | 60 bool must_remain_disabled_; |
61 bool must_remain_installed_; | 61 bool must_remain_installed_; |
62 Extension::DisableReason disable_reason_; | 62 Extension::DisableReason disable_reason_; |
63 | 63 |
64 base::string16 error_message_; | 64 base::string16 error_message_; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace extensions | 67 } // namespace extensions |
68 | 68 |
69 #endif // EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ | 69 #endif // EXTENSIONS_BROWSER_TEST_MANAGEMENT_POLICY_H_ |
OLD | NEW |