summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2016-01-14 11:24:40 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-14 19:25:45 +0000
commit0f4f8338641c6a7a0dc50e0b528f3ade27af0263 (patch)
treef2673b7421c98d4ed341713d64d45b5973072b22
parent0444f53b0790ba27c1bdc579baddf8915f03c943 (diff)
downloadchromium_src-0f4f8338641c6a7a0dc50e0b528f3ade27af0263.zip
chromium_src-0f4f8338641c6a7a0dc50e0b528f3ade27af0263.tar.gz
chromium_src-0f4f8338641c6a7a0dc50e0b528f3ade27af0263.tar.bz2
Follow up to https://codereview.chromium.org/1581473002 for Metro removal in installer
Removes ShellUtil::ShortcutProperties' |dual_mode| property. R=gab@chromium.org BUG=558054 Review URL: https://codereview.chromium.org/1573243010 Cr-Commit-Position: refs/heads/master@{#369499}
-rw-r--r--chrome/common/chrome_constants.cc1
-rw-r--r--chrome/installer/mini_installer/chrome.release1
-rw-r--r--chrome/installer/setup/install.cc3
-rw-r--r--chrome/installer/util/install_util.cc3
-rw-r--r--chrome/installer/util/shell_util.cc6
-rw-r--r--chrome/installer/util/shell_util.h16
-rw-r--r--chrome/installer/util/shell_util_unittest.cc30
-rw-r--r--chrome/tools/build/win/FILES.cfg10
8 files changed, 3 insertions, 67 deletions
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 2b58423..3b2d076 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -123,7 +123,6 @@ const base::FilePath::CharType kFrameworkName[] =
#if defined(OS_WIN)
const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll");
-const base::FilePath::CharType kMetroDriverDll[] = FPL("metro_driver.dll");
const base::FilePath::CharType kStatusTrayWindowClass[] =
FPL("Chrome_StatusTrayWindow");
#endif // defined(OS_WIN)
diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release
index 34fd53e..e554c16 100644
--- a/chrome/installer/mini_installer/chrome.release
+++ b/chrome/installer/mini_installer/chrome.release
@@ -57,7 +57,6 @@ chrome_material_200_percent.pak: %(VersionDir)s\
[GOOGLE_CHROME]
delegate_execute.exe: %(VersionDir)s\
-metro_driver.dll: %(VersionDir)s\
SecondaryTile.png: %(VersionDir)s\
widevinecdmadapter.dll: %(VersionDir)s\
#
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index c6da5d1..e905c96 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -394,9 +394,6 @@ void CreateOrUpdateShortcuts(
}
ShellUtil::ShortcutProperties start_menu_properties(base_properties);
- // IMPORTANT: Only the default (no arguments and default browserappid) browser
- // shortcut in the Start menu (Start screen on Win8+) should be made dual
- // mode and that prior to Windows 10 only.
if (shortcut_operation == ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS ||
shortcut_operation ==
ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL) {
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index bfb888c..6eb1b66 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -154,9 +154,8 @@ void InstallUtil::TriggerActiveSetupCommand() {
// and the time setup.exe checks for it.
cmd.AppendSwitch(installer::switches::kForceConfigureUserSettings);
- base::LaunchOptions launch_options;
base::Process process =
- base::LaunchProcess(cmd.GetCommandLineString(), launch_options);
+ base::LaunchProcess(cmd.GetCommandLineString(), base::LaunchOptions());
if (!process.IsValid())
PLOG(ERROR) << cmd.GetCommandLineString();
}
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 604f6be..19f1f4cb 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -299,6 +299,7 @@ void GetProgIdEntries(const ApplicationInfo& app_info,
entries->push_back(new RegistryEntry(
prog_id_path + ShellUtil::kRegShellOpen, ShellUtil::kRegDelegateExecute,
app_info.delegate_clsid));
+ // TODO(scottmg): Simplify after Metro removal. https://crbug.com/558054.
entries->back()->set_removal_flag(RegistryEntry::RemovalFlag::VALUE);
}
@@ -379,6 +380,7 @@ void GetChromeProgIdEntries(BrowserDistribution* dist,
GetChromeDelegateExecuteEntries(chrome_exe, app_info);
// Remove the keys (not only their values) so that Windows will continue
// to launch Chrome without a pesky association error.
+ // TODO(scottmg): Simplify after Metro removal. https://crbug.com/558054.
for (RegistryEntry* entry : delegate_execute_entries)
entry->set_removal_flag(RegistryEntry::RemovalFlag::KEY);
// Move |delegate_execute_entries| to |entries|.
@@ -966,9 +968,6 @@ base::win::ShortcutProperties TranslateShortcutProperties(
if (properties.has_app_id())
shortcut_properties.set_app_id(properties.app_id);
- if (properties.has_dual_mode())
- shortcut_properties.set_dual_mode(properties.dual_mode);
-
return shortcut_properties;
}
@@ -1378,7 +1377,6 @@ const wchar_t* ShellUtil::kRegOpenWithProgids = L"OpenWithProgids";
ShellUtil::ShortcutProperties::ShortcutProperties(ShellChange level_in)
: level(level_in),
icon_index(0),
- dual_mode(false),
pin_to_taskbar(false),
options(0U) {}
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index a17a787..3ec721d 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -149,17 +149,6 @@ class ShellUtil {
options |= PROPERTIES_SHORTCUT_NAME;
}
- // Sets whether this is a dual mode shortcut (Win8+).
- // Documentation on usage of the dual mode property on Win8:
- // http://go.microsoft.com/fwlink/p/?linkid=243079
- // NOTE: Only the default (no arguments and default browser appid) browser
- // shortcut in the Start menu (Start screen on Win8+) should be made dual
- // mode.
- void set_dual_mode(bool dual_mode_in) {
- dual_mode = dual_mode_in;
- options |= PROPERTIES_DUAL_MODE;
- }
-
// Sets whether to pin this shortcut to the taskbar after creating it
// (ignored if the shortcut is only being updated).
// Note: This property doesn't have a mask in |options|.
@@ -191,10 +180,6 @@ class ShellUtil {
return (options & PROPERTIES_SHORTCUT_NAME) != 0;
}
- bool has_dual_mode() const {
- return (options & PROPERTIES_DUAL_MODE) != 0;
- }
-
// The level to install this shortcut at (CURRENT_USER for a per-user
// shortcut and SYSTEM_LEVEL for an all-users shortcut).
ShellChange level;
@@ -206,7 +191,6 @@ class ShellUtil {
int icon_index;
base::string16 app_id;
base::string16 shortcut_name;
- bool dual_mode;
bool pin_to_taskbar;
// Bitfield made of IndividualProperties. Properties set in |options| will
// be used to create/update the shortcut, others will be ignored on update
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc
index f282d35..2ae2309 100644
--- a/chrome/installer/util/shell_util_unittest.cc
+++ b/chrome/installer/util/shell_util_unittest.cc
@@ -102,7 +102,6 @@ class ShellUtilShortcutTest : public testing::Test {
test_properties_.set_description(L"Makes polar bears dance.");
test_properties_.set_icon(icon_path, 7);
test_properties_.set_app_id(L"Polar.Bear");
- test_properties_.set_dual_mode(true);
}
// Returns the expected path of a test shortcut. Returns an empty FilePath on
@@ -187,11 +186,6 @@ class ShellUtilShortcutTest : public testing::Test {
expected_properties.set_app_id(ShellUtil::GetBrowserModelId(dist, true));
}
- if (properties.has_dual_mode())
- expected_properties.set_dual_mode(properties.dual_mode);
- else
- expected_properties.set_dual_mode(false);
-
base::win::ValidateShortcut(expected_path, expected_properties);
}
@@ -327,7 +321,6 @@ TEST_F(ShellUtilShortcutTest, ReplaceSystemLevelDesktopShortcut) {
// properties that don't have a default value to be set back to their default
// (as validated in ValidateChromeShortcut()) or unset if they don't .
ShellUtil::ShortcutProperties expected_properties(new_properties);
- expected_properties.set_dual_mode(false);
ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
expected_properties);
@@ -356,29 +349,6 @@ TEST_F(ShellUtilShortcutTest, UpdateQuickLaunchShortcutArguments) {
expected_properties);
}
-TEST_F(ShellUtilShortcutTest, UpdateAddDualModeToStartMenuShortcut) {
- ShellUtil::ShortcutProperties properties(ShellUtil::CURRENT_USER);
- product_->AddDefaultShortcutProperties(chrome_exe_, &properties);
- ASSERT_TRUE(
- ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, dist_,
- properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
-
- ShellUtil::ShortcutProperties added_properties(ShellUtil::CURRENT_USER);
- added_properties.set_dual_mode(true);
- ASSERT_TRUE(
- ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED, dist_,
- added_properties, ShellUtil::SHELL_SHORTCUT_UPDATE_EXISTING));
-
- ShellUtil::ShortcutProperties expected_properties(properties);
- expected_properties.set_dual_mode(true);
-
- ValidateChromeShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR_DEPRECATED,
- dist_, expected_properties);
-}
-
TEST_F(ShellUtilShortcutTest, CreateIfNoSystemLevel) {
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, test_properties_,
diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg
index 7807d42..8b2724a 100644
--- a/chrome/tools/build/win/FILES.cfg
+++ b/chrome/tools/build/win/FILES.cfg
@@ -600,21 +600,11 @@ FILES = [
},
# Metro files (currently official build only):
{
- 'filename': 'metro_driver.dll',
- 'buildtype': ['official'],
- 'filegroup': ['default', 'symsrc'],
- },
- {
'filename': 'delegate_execute.exe',
'buildtype': ['official'],
'filegroup': ['default', 'symsrc'],
},
{
- 'filename': 'metro_driver.dll.pdb',
- 'buildtype': ['official'],
- 'archive': 'chrome-win32-syms.zip',
- },
- {
'filename': 'delegate_execute.exe.pdb',
'buildtype': ['official'],
'archive': 'chrome-win32-syms.zip',