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

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

Issue 1349613003: [Extensions] Un-refcount PermissionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSION_MANAGEMENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const GURL& referrer_url) const; 107 const GURL& referrer_url) const;
108 108
109 // Returns true if an extension with manifest type |manifest_type| is 109 // Returns true if an extension with manifest type |manifest_type| is
110 // allowed to be installed. 110 // allowed to be installed.
111 bool IsAllowedManifestType(Manifest::Type manifest_type) const; 111 bool IsAllowedManifestType(Manifest::Type manifest_type) const;
112 112
113 // Returns the list of blocked API permissions for |extension|. 113 // Returns the list of blocked API permissions for |extension|.
114 APIPermissionSet GetBlockedAPIPermissions(const Extension* extension) const; 114 APIPermissionSet GetBlockedAPIPermissions(const Extension* extension) const;
115 115
116 // Returns blocked permission set for |extension|. 116 // Returns blocked permission set for |extension|.
117 scoped_refptr<const PermissionSet> GetBlockedPermissions( 117 scoped_ptr<const PermissionSet> GetBlockedPermissions(
118 const Extension* extension) const; 118 const Extension* extension) const;
119 119
120 // Returns true if every permission in |perms| is allowed for |extension|. 120 // Returns true if every permission in |perms| is allowed for |extension|.
121 bool IsPermissionSetAllowed(const Extension* extension, 121 bool IsPermissionSetAllowed(const Extension* extension,
122 scoped_refptr<const PermissionSet> perms) const; 122 const PermissionSet& perms) const;
123 123
124 // Returns true if |extension| meets the minimum required version set for it. 124 // Returns true if |extension| meets the minimum required version set for it.
125 // If there is no such requirement set for it, returns true as well. 125 // If there is no such requirement set for it, returns true as well.
126 // If false is returned and |required_version| is not null, the minimum 126 // If false is returned and |required_version| is not null, the minimum
127 // required version is returned. 127 // required version is returned.
128 bool CheckMinimumVersion(const Extension* extension, 128 bool CheckMinimumVersion(const Extension* extension,
129 std::string* required_version) const; 129 std::string* required_version) const;
130 130
131 private: 131 private:
132 typedef base::ScopedPtrHashMap<ExtensionId, 132 typedef base::ScopedPtrHashMap<ExtensionId,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 content::BrowserContext* context) const override; 210 content::BrowserContext* context) const override;
211 void RegisterProfilePrefs( 211 void RegisterProfilePrefs(
212 user_prefs::PrefRegistrySyncable* registry) override; 212 user_prefs::PrefRegistrySyncable* registry) override;
213 213
214 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 214 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
215 }; 215 };
216 216
217 } // namespace extensions 217 } // namespace extensions
218 218
219 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 219 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt_unittest.cc ('k') | chrome/browser/extensions/extension_management.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698