DescriptionThis is a follow up patch for "Introduce WebRequestEventRouterDelegate.".
In this CL, we avoid leaking the void* pointer of profile outside of
web_request_api.cc. The main idea behind is void* is used in webrequest API to
avoid accidently access to profile on IO thread. When we are certain that a
function is called on UI thread, we can cast the void* to BrowserContext*.
A refactor is made to
WebRequestEventRouterDelegate::LogExtensionActivity(...):
-Change its first parameter from void* to BrowserContext*; So we won't leak void* pointer outside of web_request_api.cc.
-This function only keeps the logic that is run on UI thread, the logic for IO thread is moved back to web_request_api.cc.
BUG=352293
Committed: https://crrev.com/ff4501a8bfde696715311c752104d17102e0d894
Cr-Commit-Position: refs/heads/master@{#296040}
Patch Set 1 #
Total comments: 8
Patch Set 2 : nits #Patch Set 3 : clean up. #Patch Set 4 : rebase. #Patch Set 5 : rebase. #Messages
Total messages: 13 (4 generated)
|