blob: edd1d5b68aadb4dbf9938af0feaaf53ada71ffd9 [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2017 The Chromium Authors
Gabriel Charettec8cca992017-08-10 18:21:492// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "content/browser/after_startup_task_utils.h"
6
Carlos Caballeroc472c2bf2019-04-18 09:30:367#include "content/browser/scheduler/browser_task_executor.h"
Gabriel Charettec8cca992017-08-10 18:21:498#include "content/public/browser/content_browser_client.h"
9#include "content/public/common/content_client.h"
10
11namespace content {
12
13void SetBrowserStartupIsCompleteForTesting() {
Minoru Chikamunea0317562022-03-22 15:30:2114 content::BrowserTaskExecutor::OnStartupComplete();
Gabriel Charettec8cca992017-08-10 18:21:4915 // Forward the message to ContentBrowserClient if one is registered (there are
16 // many tests where one isn't but that's fine as that also means they get the
17 // default ContentBrowserClient::IsBrowserStartupComplete() which is always
18 // true).
19 ContentClient* content_client = GetContentClient();
20 if (content_client) {
21 ContentBrowserClient* content_browser_client = content_client->browser();
22 if (content_browser_client)
23 content_browser_client->SetBrowserStartupIsCompleteForTesting();
24 }
25}
26
27} // namespace content