Index: extensions/browser/api/declarative/declarative_api.h |
diff --git a/extensions/browser/api/declarative/declarative_api.h b/extensions/browser/api/declarative/declarative_api.h |
index 7f3b1a2dfe9018a697c806e05521da49afaa6eeb..aa68f6032387537304ae9366c91741c612955cbc 100644 |
--- a/extensions/browser/api/declarative/declarative_api.h |
+++ b/extensions/browser/api/declarative/declarative_api.h |
@@ -28,6 +28,9 @@ class RulesFunction : public AsyncExtensionFunction { |
// Returns false in case of errors. |
virtual bool RunAsyncOnCorrectThread() = 0; |
+ // Records UMA metrics for the kind of declarative API call. |
+ virtual void RecordUMA(const std::string& event_name) const = 0; |
+ |
scoped_refptr<RulesRegistry> rules_registry_; |
}; |
@@ -40,6 +43,7 @@ class EventsEventAddRulesFunction : public RulesFunction { |
// RulesFunction: |
bool RunAsyncOnCorrectThread() override; |
+ void RecordUMA(const std::string& event_name) const override; |
}; |
class EventsEventRemoveRulesFunction : public RulesFunction { |
@@ -51,6 +55,7 @@ class EventsEventRemoveRulesFunction : public RulesFunction { |
// RulesFunction: |
bool RunAsyncOnCorrectThread() override; |
+ void RecordUMA(const std::string& event_name) const override; |
}; |
class EventsEventGetRulesFunction : public RulesFunction { |
@@ -62,6 +67,7 @@ class EventsEventGetRulesFunction : public RulesFunction { |
// RulesFunction: |
bool RunAsyncOnCorrectThread() override; |
+ void RecordUMA(const std::string& event_name) const override; |
}; |
} // namespace extensions |