Remove custom chrome scheme handling (see #3685)

- Add CEF info to existing chrome://version WebUI.
- Move chrome://license handling to WebUI.
- Remove chrome://webui-hosts; use chrome://chrome-urls instead.
- Remove chrome://extension-support; navigate to docs directly instead.
This commit is contained in:
Marshall Greenblatt
2024-07-03 13:07:46 -04:00
parent b080705ec8
commit 9b284ec8f7
16 changed files with 536 additions and 911 deletions

View File

@ -174,7 +174,7 @@ index 3553377e96017..9f6edc70ef1d4 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index f90f1b8fa54d9..3dc8a9fe49363 100644
index f90f1b8fa54d9..3c1406cc798a7 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@ -327,22 +327,7 @@ index f90f1b8fa54d9..3dc8a9fe49363 100644
// Desktop construction occurs here, (required before profile creation).
PreProfileInit();
@@ -1624,12 +1636,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
+#if !BUILDFLAG(ENABLE_CEF)
// Needs to be done before PostProfileInit, since login manager on CrOS is
// called inside PostProfileInit.
content::WebUIControllerFactory::RegisterFactory(
ChromeWebUIControllerFactory::GetInstance());
RegisterChromeWebUIConfigs();
RegisterChromeUntrustedWebUIConfigs();
+#endif
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1656,6 +1670,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1656,6 +1668,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@ -350,7 +335,7 @@ index f90f1b8fa54d9..3dc8a9fe49363 100644
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
// Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends
@@ -1695,6 +1710,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1695,6 +1708,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@ -358,7 +343,7 @@ index f90f1b8fa54d9..3dc8a9fe49363 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1786,6 +1802,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1786,6 +1800,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -370,7 +355,7 @@ index f90f1b8fa54d9..3dc8a9fe49363 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1818,11 +1839,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1818,11 +1837,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.