mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
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:
@@ -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",
|
||||
|
||||
@@ -210,7 +210,6 @@ int ElectronBrowserMainParts::PreEarlyInitialization() {
|
||||
HandleSIGCHLD();
|
||||
#endif
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
SetDesktopStartupId();
|
||||
ui::OzonePlatform::PreEarlyInitialization();
|
||||
#endif
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user