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

Side by Side Diff: chrome/browser/extensions/management_policy.h

Issue 10542023: Disable modifying extensions when in managed mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixed Evan's nits Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_MANAGEMENT_POLICY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MANAGEMENT_POLICY_H_
6 #define CHROME_BROWSER_EXTENSIONS_MANAGEMENT_POLICY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MANAGEMENT_POLICY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 // For all of the Provider methods below, if |error| is not NULL and the 40 // For all of the Provider methods below, if |error| is not NULL and the
41 // method imposes a restriction on the desired action, |error| may be set 41 // method imposes a restriction on the desired action, |error| may be set
42 // to an applicable error message, but this is not required. 42 // to an applicable error message, but this is not required.
43 class Provider { 43 class Provider {
44 public: 44 public:
45 Provider() {} 45 Provider() {}
46 virtual ~Provider() {} 46 virtual ~Provider() {}
47 47
48 // A human-readable name for this provider, for use in debug messages. 48 // A human-readable name for this provider, for use in debug messages.
49 virtual std::string GetPolicyProviderName() const = 0; 49 // Implementers should return an empty string in non-debug builds, to save
50 // executable size.
51 virtual std::string GetDebugPolicyProviderName() const = 0;
50 52
51 // Providers should return false if a user may not install the |extension|, 53 // Providers should return false if a user may not install the |extension|,
52 // or load or run it if it has already been installed. 54 // or load or run it if it has already been installed.
53 virtual bool UserMayLoad(const Extension* extension, 55 virtual bool UserMayLoad(const Extension* extension,
54 string16* error) const; 56 string16* error) const;
55 57
56 // Providers should return false if a user may not enable, disable, or 58 // Providers should return false if a user may not enable, disable, or
57 // uninstall the |extension|, or change its usage options (incognito 59 // uninstall the |extension|, or change its usage options (incognito
58 // permission, file access, etc.). 60 // permission, file access, etc.).
59 virtual bool UserMayModifySettings(const Extension* extension, 61 virtual bool UserMayModifySettings(const Extension* extension,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 private: 105 private:
104 typedef std::set<Provider*> ProviderList; 106 typedef std::set<Provider*> ProviderList;
105 ProviderList providers_; 107 ProviderList providers_;
106 108
107 DISALLOW_COPY_AND_ASSIGN(ManagementPolicy); 109 DISALLOW_COPY_AND_ASSIGN(ManagementPolicy);
108 }; 110 };
109 111
110 } // namespace 112 } // namespace
111 113
112 #endif // CHROME_BROWSER_EXTENSIONS_MANAGEMENT_POLICY_H_ 114 #endif // CHROME_BROWSER_EXTENSIONS_MANAGEMENT_POLICY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/management_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698