mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
Update chrome_proxy_main_win.cc
This commit is contained in:
parent
b849ddcdc2
commit
67a895f227
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2022 The Chromium Authors and Alex313031. All rights reserved.
|
||||
// Copyright 2023 The Chromium Authors and Alex313031. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
|||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -59,6 +60,15 @@ int WINAPI wWinMain(HINSTANCE instance,
|
|||
for (size_t i = 1; i < argv.size(); ++i)
|
||||
chrome_command_line.AppendArgNative(argv[i]);
|
||||
|
||||
// Pass to Chrome the path of the shortcut, if any, that launched
|
||||
// chrome_proxy.exe. This is used to record LaunchMode metrics.
|
||||
STARTUPINFOW si = {sizeof(si)};
|
||||
::GetStartupInfoW(&si);
|
||||
if (si.dwFlags & STARTF_TITLEISLINKNAME) {
|
||||
chrome_command_line.AppendSwitchNative(switches::kSourceShortcut,
|
||||
si.lpTitle);
|
||||
}
|
||||
|
||||
base::LaunchOptions launch_options;
|
||||
launch_options.current_directory = chrome_dir;
|
||||
launch_options.grant_foreground_privilege = true;
|
||||
|
|
Loading…
Reference in a new issue