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

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

Issue 19690003: Extension activity log database refactoring (step 3) (Closed) Base URL: http://git.chromium.org/chromium/src.git@refactor2
Patch Set: Do not set bad BlockedChromeActivityDetail::Reason values Created 7 years, 5 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/activity_log.h
diff --git a/chrome/browser/extensions/activity_log/activity_log.h b/chrome/browser/extensions/activity_log/activity_log.h
index 19813c28e3a23867231dc4aa9b41985d0914b880..446d9af92a43303db101b549449b7a9e62daf392 100644
--- a/chrome/browser/extensions/activity_log/activity_log.h
+++ b/chrome/browser/extensions/activity_log/activity_log.h
@@ -17,7 +17,6 @@
#include "chrome/browser/extensions/activity_log/activity_actions.h"
#include "chrome/browser/extensions/activity_log/activity_database.h"
#include "chrome/browser/extensions/activity_log/activity_log_policy.h"
-#include "chrome/browser/extensions/activity_log/api_actions.h"
#include "chrome/browser/extensions/install_observer.h"
#include "chrome/browser/extensions/install_tracker.h"
#include "chrome/browser/extensions/tab_helper.h"
@@ -66,6 +65,21 @@ class ActivityLog : public BrowserContextKeyedService,
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
+ // Logs an extension action: passes it to any installed policy to be logged
+ // to the database, to any observers, and logs to the console if in testing
+ // mode.
+ //
+ // The convenience Log*Action methods below can be used as well if the caller
+ // does not wish to construct the Action object itself, however those methods
+ // are somewhat deprecated.
+ void LogAction(scoped_refptr<Action> action);
+
+ // TODO(mvrable): The calls below take args as a raw pointer, but the callee
+ // does not own the object so these should more properly be a const pointer.
+ // The callee is forced to make a copy of the object which in some cases is
+ // wasteful, and it could be better to take a scoped_ptr as input. Switching
+ // to using LogAction is another way to clean this up.
+
// Log a successful API call made by an extension.
// This will create an APIAction for storage in the database.
// (Note: implemented as a wrapper for LogAPIActionInternal.)

Powered by Google App Engine
This is Rietveld 408576698