diff options
-rw-r--r-- | build/gn_migration.gypi | 1 | ||||
-rw-r--r-- | chrome/app_shim/app_shim_win.gypi | 32 | ||||
-rw-r--r-- | chrome/app_shim/win/app_shim.exe.manifest | 14 | ||||
-rw-r--r-- | chrome/app_shim/win/app_shim.rc | 1 | ||||
-rw-r--r-- | chrome/app_shim/win/app_shim_main.cc | 75 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_win.cc | 2 | ||||
-rw-r--r-- | chrome/chrome.gyp | 1 |
7 files changed, 2 insertions, 124 deletions
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi index 4f5a5f6..2e83a2b 100644 --- a/build/gn_migration.gypi +++ b/build/gn_migration.gypi @@ -657,7 +657,6 @@ ['OS=="win"', { 'dependencies': [ # TODO(GYP): All of these targets still need to be converted. - '../chrome/chrome.gyp:app_shim', '../chrome/chrome.gyp:gcapi_dll', '../chrome/chrome.gyp:gcapi_test', '../chrome/chrome.gyp:pack_policy_templates', diff --git a/chrome/app_shim/app_shim_win.gypi b/chrome/app_shim/app_shim_win.gypi deleted file mode 100644 index e04c037..0000000 --- a/chrome/app_shim/app_shim_win.gypi +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - # This is the app shim on Windows. It is a small binary that simply runs - # Chrome, passing along any command-line arguments. - { - 'target_name': 'app_shim', - 'type': 'executable', - 'dependencies': [ - 'launcher_support', - '../base/base.gyp:base', - ], - 'sources': [ - 'win/app_shim.rc', - 'win/app_shim_main.cc', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS - }, - 'VCManifestTool': { - 'AdditionalManifestFiles': [ - 'app_shim/win/app_shim.exe.manifest', - ], - }, - }, - }, - ], # targets -} diff --git a/chrome/app_shim/win/app_shim.exe.manifest b/chrome/app_shim/win/app_shim.exe.manifest deleted file mode 100644 index 429e2ee..0000000 --- a/chrome/app_shim/win/app_shim.exe.manifest +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - - <!--The compatibility section will be merged from build/win/compatibility.manifest --> - - <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> - <security> - <requestedPrivileges> - <requestedExecutionLevel level="asInvoker" /> - </requestedPrivileges> - </security> - </trustInfo> - -</assembly> diff --git a/chrome/app_shim/win/app_shim.rc b/chrome/app_shim/win/app_shim.rc deleted file mode 100644 index 4924f07..0000000 --- a/chrome/app_shim/win/app_shim.rc +++ /dev/null @@ -1 +0,0 @@ -IDR_MAINFRAME ICON "..\\..\\chrome\\app\\theme\\chromium\\win\\webstore.ico" diff --git a/chrome/app_shim/win/app_shim_main.cc b/chrome/app_shim/win/app_shim_main.cc deleted file mode 100644 index 6835f25..0000000 --- a/chrome/app_shim/win/app_shim_main.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <windows.h> - -#include <string> - -#include "base/command_line.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/process/launch.h" -#include "chrome/installer/launcher_support/chrome_launcher_support.h" - -namespace { - -// Return codes. -const int kOK = 0; -const int kNoProgram = 1; -const int kLaunchFailure = 2; - -// Command-line switches. -const char kChromeSxS[] = "chrome-sxs"; - -} // namespace - -// This program runs chrome.exe, passing its arguments on to the Chrome binary. -// It uses the Windows registry to find chrome.exe (and hence it only works if -// Chrome/Chromium has been properly installed). It terminates as soon as the -// program is launched. It is intended to allow file types to be associated with -// Chrome apps, with a custom name (and in some cases, icon) rather than simply -// the name of the Chrome binary. -// -// Usage: app_shim_win [--chrome-sxs] -- [CHROME_ARGS...] -// -// The -- is required if switches are to be passed to Chrome; any switches -// before the -- will be interpreted by app_shim_win, and not passed to Chrome. -// -// If --chrome-sxs is specified, looks for the SxS (Canary) build of Chrome. -// This will always fail for Chromium. -int WINAPI wWinMain(HINSTANCE instance, - HINSTANCE prev_instance, - wchar_t* /*command_line*/, - int show_command) { - base::CommandLine::Init(0, nullptr); - - // Log to stderr. Otherwise it will log to a file by default. - logging::LoggingSettings logging_settings; - logging_settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; - logging::InitLogging(logging_settings); - - // Get the command-line for the Chrome binary. - // --chrome-sxs on the command line means we should run the SxS binary. - bool is_sxs = base::CommandLine::ForCurrentProcess()->HasSwitch(kChromeSxS); - base::FilePath chrome_path = - chrome_launcher_support::GetAnyChromePath(is_sxs); - if (chrome_path.empty()) { - LOG(ERROR) << "Could not find chrome.exe path in the registry."; - return kNoProgram; - } - base::CommandLine command_line(chrome_path); - - // Get the command-line arguments for the subprocess, consisting of the - // arguments (but not switches) to this binary. This gets everything after the - // "--". - for (const auto& arg : base::CommandLine::ForCurrentProcess()->GetArgs()) - command_line.AppendArgNative(arg); - - if (!base::LaunchProcess(command_line, base::LaunchOptions()).IsValid()) { - LOG(ERROR) << "Could not run chrome.exe."; - return kLaunchFailure; - } - - return kOK; -} diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc index 787d51e..2439287 100644 --- a/chrome/browser/web_applications/web_app_win.cc +++ b/chrome/browser/web_applications/web_app_win.cc @@ -39,6 +39,8 @@ namespace { const base::FilePath::CharType kIconChecksumFileExt[] = FILE_PATH_LITERAL(".ico.md5"); +// TODO(brettw) bug 540043: This binary no longer exists and any code that uses +// it is dead code. This should be deleted. const base::FilePath::CharType kAppShimExe[] = FILE_PATH_LITERAL("app_shim.exe"); diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 907f914..5fae3f0 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -489,7 +489,6 @@ }, ], # 'targets' 'includes': [ - 'app_shim/app_shim_win.gypi', 'chrome_watcher/chrome_watcher.gypi', 'chrome_process_finder.gypi', 'metro_utils.gypi', |