|
[Extensions] Short-circuit activity logging if not enabled
In order to log activity events in extensions, we need to copy all the
arguments that were passed to the method or event. In some cases (such
as messaging), this can be an extreme amount of work. Additionally, this
can require passing objects from the IO to UI thread. In an extreme
case, we would also create copies of arguments sent via the activityLog
API itself - meaning that for any given API call, we created two extra
copies of all arguments (one for the activity log itself, and another
for the record of the activityLog event dispatch). In some cases, this
activity logging resulted in more work than the API call itself.
Instead, store state around which profiles have an actively-recording
ActivityLog and which extensions are whitelisted in a thread-safe manner
so that we can short-circuit the logging in most cases, and avoid
creating excessive copies for the 99% case.
BUG= 620359
Committed: https://crrev.com/a84983c58d89dbb83fc97eb24ad70f5780375dd9
Cr-Commit-Position: refs/heads/master@{#401162}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+508 lines, -301 lines) |
Patch |
 |
M |
chrome/browser/extensions/activity_log/activity_log.h
|
View
|
|
6 chunks |
+20 lines, -14 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/activity_log/activity_log.cc
|
View
|
|
13 chunks |
+255 lines, -34 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/activity_log/activity_log_browsertest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/activity_log/activity_log_unittest.cc
|
View
|
1
2
|
5 chunks |
+38 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/chrome_extensions_api_client.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/chrome_extensions_api_client.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.cc
|
View
|
|
2 chunks |
+1 line, -30 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/chrome_extensions_browser_client.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/chrome_extensions_browser_client.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/renderer_host/chrome_extension_message_filter.h
|
View
|
|
3 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/renderer_host/chrome_extension_message_filter.cc
|
View
|
|
7 chunks |
+28 lines, -12 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/extensions_api_client.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/extensions_api_client.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/web_request/web_request_api.h
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/web_request/web_request_api.cc
|
View
|
|
5 chunks |
+10 lines, -39 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/web_request/web_request_event_router_delegate.h
|
View
|
|
1 chunk |
+2 lines, -34 lines |
0 comments
|
Download
|
 |
D |
extensions/browser/api/web_request/web_request_event_router_delegate.cc
|
View
|
|
1 chunk |
+0 lines, -20 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api_activity_monitor.h
|
View
|
1
|
1 chunk |
+53 lines, -19 lines |
0 comments
|
Download
|
 |
A |
extensions/browser/api_activity_monitor.cc
|
View
|
1
|
1 chunk |
+74 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/event_router.cc
|
View
|
|
2 chunks |
+4 lines, -17 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/extension_function_dispatcher.cc
|
View
|
|
3 chunks |
+5 lines, -26 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/extensions_browser_client.h
|
View
|
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/test_extensions_browser_client.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/test_extensions_browser_client.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
extensions/extensions.gypi
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
extensions/shell/browser/shell_extensions_browser_client.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/shell/browser/shell_extensions_browser_client.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
Total messages: 18 (8 generated)
|