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

Unified Diff: extensions/common/extension.h

Issue 309533007: Refactor PermissionsData pt1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/extension.h
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 797c906b40dd007382baf2744d94faa1597db3e7..1423adb7be57dda3fe1c4ac8c52d560cb201c311 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -43,10 +43,11 @@ class ImageSkia;
}
namespace extensions {
-class PermissionsData;
class APIPermissionSet;
class ManifestPermissionSet;
class PermissionSet;
+class PermissionsData;
+class PermissionsParser;
// Uniquely identifies an Extension, using 32 characters from the alphabet
// 'a'-'p'. An empty string represents "no extension".
@@ -309,7 +310,11 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool converted_from_user_script() const {
return converted_from_user_script_;
}
- PermissionsData* permissions_data() { return permissions_data_.get(); }
+ PermissionsParser* permissions_parser() { return permissions_parser_.get(); }
+ const PermissionsParser* permissions_parser() const {
+ return permissions_parser_.get();
+ }
not at google - send to devlin 2014/06/02 23:20:06 neither PermissionsParser nor PermissionsData belo
not at google - send to devlin 2014/06/03 14:39:36 Thinking about this a bit more, PermissionsData *d
Devlin 2014/06/03 15:28:21 Yeah, I came to the same conclusion (hence the tod
+
const PermissionsData* permissions_data() const {
return permissions_data_.get();
}
@@ -428,6 +433,12 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Defines the set of URLs in the extension's web content.
URLPatternSet extent_;
+ // The parser for the manifest's permissions. This is NULL anytime not during
+ // initialization.
+ // TODO(rdevlin.cronin): This doesn't really belong here.
+ scoped_ptr<PermissionsParser> permissions_parser_;
+
+ // The active permissions for the extension.
scoped_ptr<PermissionsData> permissions_data_;
// Any warnings that occurred when trying to create/parse the extension.

Powered by Google App Engine
This is Rietveld 408576698