Remove DESKTOP_STARTUP_ID code

This was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6819616 and I confirmed with the author that it was an intentional change. Going to mirror upstream and remove it here too.
This commit is contained in:
clavin
2025-08-08 16:30:21 -06:00
parent 29acf2660b
commit 8fffb83c11
4 changed files with 0 additions and 29 deletions

View File

@@ -23,7 +23,6 @@ filenames = {
lib_sources_linux = [
"shell/browser/browser_linux.cc",
"shell/browser/electron_browser_main_parts_linux.cc",
"shell/browser/lib/power_observer_linux.cc",
"shell/browser/lib/power_observer_linux.h",
"shell/browser/linux/unity_service.cc",

View File

@@ -210,7 +210,6 @@ int ElectronBrowserMainParts::PreEarlyInitialization() {
HandleSIGCHLD();
#endif
#if BUILDFLAG(IS_LINUX)
SetDesktopStartupId();
ui::OzonePlatform::PreEarlyInitialization();
#endif
#if BUILDFLAG(IS_MAC)

View File

@@ -124,10 +124,6 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
#endif
#if BUILDFLAG(IS_LINUX)
void SetDesktopStartupId();
#endif
#if BUILDFLAG(IS_MAC)
void FreeAppDelegate();
void RegisterURLHandler();

View File

@@ -1,23 +0,0 @@
// Copyright (c) 2022 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/browser/electron_browser_main_parts.h"
#include "base/command_line.h"
#include "base/environment.h"
namespace electron {
void ElectronBrowserMainParts::SetDesktopStartupId() {
// TODO(clavin): this was removed upstream in
// https://chromium-review.googlesource.com/c/chromium/src/+/6819616 but it's
// not clear if that was intentional.
auto const env = base::Environment::Create();
auto* const command_line = base::CommandLine::ForCurrentProcess();
if (std::optional<std::string> desktop_startup_id =
env->GetVar("DESKTOP_STARTUP_ID"))
command_line->AppendSwitchASCII("desktop-startup-id", *desktop_startup_id);
}
} // namespace electron