Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: extensions/browser/test_management_policy.h

Issue 664933004: Standardize usage of virtual/override/final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « extensions/browser/test_extensions_browser_client.h ('k') | extensions/browser/test_runtime_api_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698