[BrowserThread] Migrate callers explicitly using content::
Note to QA: This CL is purely mechanical and shouldn't be blamed
for future regressions on touched files.
Only migrate explicit usage of content::BrowserThread in step #1 as
these are the only ones that clearly map to a fully qualified call to
content::Get(UI|IO)ThreadTaskRunner().
Script @ https://crbug.com/1026641#c91
Will make BrowserTaskTraits optional when empty in a follow-up
(can't before end of migration because of cyclic dependency between
browser_thread.h and browser_task_traits.h).
(will TBR fdoray@ post-review for mechanical change)
[email protected]
AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I27615773472c97d9bfd981c8c9e783c26525b51a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211138
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: François Doray <[email protected]>
Commit-Queue: Gabriel Charette <[email protected]>
Auto-Submit: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/master@{#772055}
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 1395818..db2c5764 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -1317,7 +1317,7 @@
optimization_guide_service_ =
std::make_unique<optimization_guide::OptimizationGuideService>(
- base::CreateSingleThreadTaskRunner({content::BrowserThread::UI}));
+ content::GetUIThreadTaskRunner({}));
}
void BrowserProcessImpl::CreateGCMDriver() {
@@ -1344,8 +1344,7 @@
system_network_context_manager()->GetSharedURLLoaderFactory(),
content::GetNetworkConnectionTracker(), chrome::GetChannel(),
gcm::GetProductCategoryForSubtypes(local_state()),
- base::CreateSingleThreadTaskRunner({content::BrowserThread::UI}),
- base::CreateSingleThreadTaskRunner({content::BrowserThread::IO}),
+ content::GetUIThreadTaskRunner({}), content::GetIOThreadTaskRunner({}),
blocking_task_runner);
#endif // defined(OS_ANDROID)
}