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

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

Issue 2089333002: [Extensions] Add renderer-side logic to short circuit activity logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.cc b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
index b4f6d49a735967ca4bc37586cc4081682b05b132..a34a8ac157eb10b35ce6136272eb67af6f47071c 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.cc
@@ -341,8 +341,9 @@ void ChromeExtensionMessageFilter::Observe(
bool ChromeExtensionMessageFilter::ShouldLogExtensionAction(
const std::string& extension_id) const {
- // TODO(devlin): Ideally, we'd be able to determine this in the renderer so
- // that we don't even send the IPC.
+ // We only send these IPCs if activity logging is enabled, but due to race
+ // conditions (e.g. logging gets disabled but the renderer sends the message
+ // before it gets updated), we still need this check here.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
return profile_ &&
g_browser_process->profile_manager()->IsValidProfile(profile_) &&

Powered by Google App Engine
This is Rietveld 408576698