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

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

Issue 2863053002: Extensions: Add metrics to distinguish between the different kinds of declarative API function call… (Closed)
Patch Set: Address comments. Created 3 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
« no previous file with comments | « no previous file | extensions/browser/api/declarative/declarative_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | extensions/browser/api/declarative/declarative_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698