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