Commit ad431de2 authored by Marina Ciocea's avatar Marina Ciocea Committed by Commit Bot

Revert "Delay audio service launch on the browser startup."

This reverts commit eab3705f.

Reason for revert: regression reported in https://crbug.com/870171

Original change's description:
> Delay audio service launch on the browser startup.
> 
> (see the bug) From the traces the service/process creation gets posted to the
> IO thread during startup.
> It may be delaying startup for some other services needed for the first paint, or it may be
> just eating up CPU when the load is already quite high. We'll experiment with delaying
> the service launch.
> 
> Bug: 867461
> Change-Id: I048e33d049e665d8e9489046c5813918d8077524
> Reviewed-on: https://chromium-review.googlesource.com/1153248
> Commit-Queue: Olga Sharonova <olka@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#579460}

TBR=gab@chromium.org,olka@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 867461
Change-Id: If0751dd76f8e880d0fc8454c6707778de5ce6685
Reviewed-on: https://chromium-review.googlesource.com/1162183Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580819}
parent 66ac6eec
...@@ -1712,20 +1712,9 @@ void BrowserMainLoop::InitializeAudio() { ...@@ -1712,20 +1712,9 @@ void BrowserMainLoop::InitializeAudio() {
} }
if (base::FeatureList::IsEnabled(features::kAudioServiceLaunchOnStartup)) { if (base::FeatureList::IsEnabled(features::kAudioServiceLaunchOnStartup)) {
// Schedule the audio service startup on the main thread. content::ServiceManagerConnection::GetForProcess()
BrowserThread::PostAfterStartupTask( ->GetConnector()
FROM_HERE, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), ->StartService(audio::mojom::kServiceName);
base::BindOnce([]() {
TRACE_EVENT0("audio", "Starting audio service");
ServiceManagerConnection* connection =
content::ServiceManagerConnection::GetForProcess();
if (connection) {
// The browser is not shutting down: |connection| would be null
// otherwise.
connection->GetConnector()->StartService(
audio::mojom::kServiceName);
}
}));
} }
audio_system_ = audio::CreateAudioSystem( audio_system_ = audio::CreateAudioSystem(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment