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

Unified Diff: chrome/browser/renderer_host/chrome_extension_message_filter.h

Issue 2077723002: [Extensions] Short-circuit activity logging if not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Test Created 4 years, 6 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/renderer_host/chrome_extension_message_filter.h
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h
index 087740dde512d0aacb1652fad308a5a26cfacf54..12d09e41a2b2f7692e69a5bd74881fd5566d78b9 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.h
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h
@@ -25,6 +25,7 @@ class FilePath;
}
namespace extensions {
+class ActivityLog;
class InfoMap;
struct Message;
}
@@ -108,6 +109,9 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
+ // Returns true if an action should be logged for the given extension.
+ bool ShouldLogExtensionAction(const std::string& extension_id) const;
+
const int render_process_id_;
// The Profile associated with our renderer process. This should only be
@@ -116,6 +120,10 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter,
// calls and the like.
Profile* profile_;
+ // The ActivityLog associated with the given profile. Also only safe to
+ // access on the UI thread, and may be null.
+ extensions::ActivityLog* activity_log_;
+
scoped_refptr<extensions::InfoMap> extension_info_map_;
content::NotificationRegistrar notification_registrar_;

Powered by Google App Engine
This is Rietveld 408576698