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

Unified Diff: chrome/browser/extensions/activity_log.h

Issue 11946028: Record event activity to the extension activity log. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update database schema if needed Created 7 years, 11 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/activity_log.h
diff --git a/chrome/browser/extensions/activity_log.h b/chrome/browser/extensions/activity_log.h
index 27761a9c334f39de7d2c74c66943ab990bf053d8..d6fadbc87edbff3d2da8a11f97918acd294cf27b 100644
--- a/chrome/browser/extensions/activity_log.h
+++ b/chrome/browser/extensions/activity_log.h
@@ -36,7 +36,8 @@ class ActivityLog : public ProfileKeyedService,
enum Activity {
ACTIVITY_EXTENSION_API_CALL, // Extension API invocation is called.
ACTIVITY_EXTENSION_API_BLOCK, // Extension API invocation is blocked.
- ACTIVITY_CONTENT_SCRIPT // Content script is executing.
+ ACTIVITY_CONTENT_SCRIPT, // Content script is executing.
+ ACTIVITY_EVENT_DISPATCH, // Event sent to listener in extension.
Eric Dingle 2013/01/24 16:16:34 Looking back, it would have been nice if those fir
};
// Observers can listen for activity events.
@@ -67,14 +68,21 @@ class ActivityLog : public ProfileKeyedService,
// Log a successful API call made by an extension.
// This will create an APIAction for storage in the database.
void LogAPIAction(const Extension* extension,
- const std::string& name, // e.g., chrome.tabs.get
+ const std::string& name, // e.g., tabs.get
const ListValue* args, // the argument values e.g. 46
const std::string& extra); // any extra logging info
+ // Log an event notification delivered to an extension.
+ // This will crate an APIActiion for storage in the database.
Eric Dingle 2013/01/24 16:16:34 *create *APIAction
mvrable 2013/01/24 18:12:31 Done.
+ void LogEventAction(const Extension* extension,
+ const std::string& name, // e.g., tabs.onUpdate
+ const ListValue* args, // arguments to the callback
Eric Dingle 2013/01/24 16:16:34 All comments should begin capitalized and end with
mvrable 2013/01/24 18:12:31 Is that necessary even here? There isn't much roo
Eric Dingle 2013/01/24 18:56:56 Fine to leave as is. On 2013/01/24 18:12:31, mvra
+ const std::string& extra); // any extra logging info
+
// Log a blocked API call made by an extension.
// This will create a BlockedAction for storage in the database.
void LogBlockedAction(const Extension* extension,
- const std::string& blocked_call, // eg chrome.tabs.get
+ const std::string& blocked_call, // eg tabs.get
Eric Dingle 2013/01/24 16:16:34 Be consistent with your e.g.,
mvrable 2013/01/24 18:12:31 Done.
const ListValue* args, // argument values
const char* reason, // why it's blocked
const std::string& extra); // extra logging info

Powered by Google App Engine
This is Rietveld 408576698