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

Unified Diff: chrome/browser/extensions/api/declarative/declarative_api.h

Issue 10823247: In the declarative API, check that the extension has permission for the event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove ExtensionSystem debugging Created 8 years, 4 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: chrome/browser/extensions/api/declarative/declarative_api.h
diff --git a/chrome/browser/extensions/api/declarative/declarative_api.h b/chrome/browser/extensions/api/declarative/declarative_api.h
index e8fb7392909fab9ffad7d6b698cc23f7e24642f1..00948a64b47b9865dc7e7139e1a07d3ee7e71d5a 100644
--- a/chrome/browser/extensions/api/declarative/declarative_api.h
+++ b/chrome/browser/extensions/api/declarative/declarative_api.h
@@ -20,6 +20,7 @@ class RulesFunction : public AsyncExtensionFunction {
virtual ~RulesFunction();
// ExtensionFunction:
+ virtual bool HasPermission() OVERRIDE;
virtual bool RunImpl() OVERRIDE;
// Concrete implementation of the RulesFunction that is being called
@@ -28,6 +29,13 @@ class RulesFunction : public AsyncExtensionFunction {
virtual bool RunImplOnCorrectThread() = 0;
scoped_refptr<RulesRegistry> rules_registry_;
+
+ private:
+ // Initializes |event_name_| from |args_| if it hasn't been already,
+ // and returns true if it was successful.
+ bool Init();
+
+ std::string event_name_;
};
class AddRulesFunction : public RulesFunction {

Powered by Google App Engine
This is Rietveld 408576698