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

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: Rebase 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
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..73bc1000085396473f7fcf36650d67b489efe869 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;
+ // Logs UMA metrics recording the kind of declarative API call.
+ virtual void LogAPICall(const std::string& event_name) const = 0;
lazyboy 2017/05/05 21:07:42 Log is too generic for this function name, name it
karandeepb 2017/05/05 22:33:43 Done.
+
scoped_refptr<RulesRegistry> rules_registry_;
};
@@ -40,6 +43,7 @@ class EventsEventAddRulesFunction : public RulesFunction {
// RulesFunction:
bool RunAsyncOnCorrectThread() override;
+ void LogAPICall(const std::string& event_name) const override;
};
class EventsEventRemoveRulesFunction : public RulesFunction {
@@ -51,6 +55,7 @@ class EventsEventRemoveRulesFunction : public RulesFunction {
// RulesFunction:
bool RunAsyncOnCorrectThread() override;
+ void LogAPICall(const std::string& event_name) const override;
};
class EventsEventGetRulesFunction : public RulesFunction {
@@ -62,6 +67,7 @@ class EventsEventGetRulesFunction : public RulesFunction {
// RulesFunction:
bool RunAsyncOnCorrectThread() override;
+ void LogAPICall(const std::string& event_name) const override;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698