Add Location annotation ScopedBlockingCall
This CL is adding the FROM_HERE location of the call sites to each
ScopedBlockingCall. This modification will provide the
detailed location to the trace events and allow developpers do
understand cause of janks of long tasks.
This CL is trying to catch most of the call sites using this pattern:
^(\s*)(base::)?ScopedBlockingCall ([a-zA-Z0-9_]*)\((base::)?BlockingType
-->
\1\2ScopedBlockingCall \3\(FROM_HERE, \4BlockingType
Over every .cc, .h and .mm files under chromium.
[email protected] (mechanical change for //base)
Bug: 934302
Change-Id: I9b7a573ab84d81cae1b8fc173b6e8ff96155ccb6
Reviewed-on: https://chromium-review.googlesource.com/c/1483834
Commit-Queue: Etienne Bergeron <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Etienne Pierre-Doray <[email protected]>
Cr-Commit-Position: refs/heads/master@{#635580}
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 061c0c2..7fb903e 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -531,7 +531,8 @@
} // namespace
bool SetAsDefaultBrowser() {
- base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::MAY_BLOCK);
base::FilePath chrome_exe;
if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) {
@@ -551,7 +552,8 @@
}
bool SetAsDefaultProtocolClient(const std::string& protocol) {
- base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::MAY_BLOCK);
if (protocol.empty())
return false;
@@ -631,7 +633,8 @@
namespace win {
bool SetAsDefaultBrowserUsingIntentPicker() {
- base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::MAY_BLOCK);
base::FilePath chrome_exe;
if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) {
@@ -674,7 +677,8 @@
}
bool SetAsDefaultProtocolClientUsingIntentPicker(const std::string& protocol) {
- base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK);
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::MAY_BLOCK);
base::FilePath chrome_exe;
if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) {