summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration_win.cc
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 01:34:05 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 01:34:05 +0000
commit126f4623cb88b29c875795b61b3fdec2b9452462 (patch)
treedcf1d78d5c8f90481fc3d4351d56b1b1734f5e1f /chrome/browser/shell_integration_win.cc
parent5f3da203452e182901053f07b33ddfa0a22e337c (diff)
downloadchromium_src-126f4623cb88b29c875795b61b3fdec2b9452462.zip
chromium_src-126f4623cb88b29c875795b61b3fdec2b9452462.tar.gz
chromium_src-126f4623cb88b29c875795b61b3fdec2b9452462.tar.bz2
Refactor ShellUtil shortcut code -- single multi-purpose methods as opposed to many slighlty different methods.
Merge Quick Launch + Desktop logic into same call and add start menu shortcut logic in the mix too. Make properties based API (like the one introduced in base/win/shortcut.h) with default values to simplify call sites who just want to create a basic Chrome shortcut. shell_util.h: (CreateChromeDesktopShortcut, CreateChromeQuickLaunchShortcut, UpdateChromeShortcut) => CreateOrUpdateChromeShortcut (GetDesktopPath, GetQuickLaunchPath) => GetShortcutPath (GetChromeShortcutName) => ChromeShortcutProperties::set_shortcut_name() (i.e. default name is GetAppShortcutName() unless set otherwise... special profile shortcut appending logic moved to ProfileShortcutManager::GetShortcutNameForProfile). (RemoveChromeDesktopShortcut, RemoveChromeDesktopShortcutsWithAppendedNames) => RemoveChromeShortcut install.h: (CreateOrUpdateStartMenuAndTaskbarShortcuts, CreateOrUpdateDesktopAndQuickLaunchShortcuts) => CreateOrUpdateShortcuts (and incorporate some of the logic previously handled directly in InstallOrUpdateProduct()). Finally thoroughly tests shell_util and install shortcut methods! BUG=148539 TEST=Install chrome at user and system level with and without create_all_shortcuts master pref and make sure it works as intended in all scenarios. installer_util_unittests.exe --gtest_filter=ShellUtilShortcutTest* setup_unittests.exe --gtest_filter=InstallShortcutTest* unit_tests.exe --gtest_filter=ProfileShortcutManagerTest* Review URL: https://chromiumcodereview.appspot.com/10836247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_win.cc')
-rw-r--r--chrome/browser/shell_integration_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 34e8d3e..fe34868 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -608,7 +608,8 @@ FilePath ShellIntegration::GetStartMenuShortcut(const FilePath& chrome_exe) {
continue;
}
- shortcut = shortcut.Append(shortcut_name).Append(shortcut_name + L".lnk");
+ shortcut = shortcut.Append(shortcut_name).Append(shortcut_name +
+ installer::kLnkExt);
if (file_util::PathExists(shortcut))
return shortcut;
}