summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 04:42:17 +0000
committermgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 04:42:17 +0000
commitcf610e64c266bbfd179392afe3d0d5ea3d70d642 (patch)
tree6bde75c83a8e37aadf3c9412302ccf9edb371df6 /apps
parent9faa02dd3761bdfde3354637643375e948681b7e (diff)
downloadchromium_src-cf610e64c266bbfd179392afe3d0d5ea3d70d642.zip
chromium_src-cf610e64c266bbfd179392afe3d0d5ea3d70d642.tar.gz
chromium_src-cf610e64c266bbfd179392afe3d0d5ea3d70d642.tar.bz2
Once-off automatic app shortcut creation no longer creates duplicate shortcuts.
Fixes Windows-only issue introduced in SVN 207832 where if there were any existing shortcuts, a duplicate would be created. Now detects whether there is already a shortcut for the same profile and app ID, and if so, does not create another one. BUG=253806 TEST=Remove "shortcuts_have_been_created" in preferences, and restart Chrome; should not create duplicate shortcuts. TEST=Install same app in two profiles, delete shortcut in default profile, edit prefs again and restart; should create a second shortcut for the app in the default profile. Review URL: https://chromiumcodereview.appspot.com/17591016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/shortcut_manager.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/shortcut_manager.cc b/apps/shortcut_manager.cc
index d03cf5ca..8c4e001 100644
--- a/apps/shortcut_manager.cc
+++ b/apps/shortcut_manager.cc
@@ -31,7 +31,8 @@ using extensions::Extension;
namespace {
-// Creates a shortcut for an application in the applications menu.
+// Creates a shortcut for an application in the applications menu, if there is
+// not already one present.
void CreateShortcutsInApplicationsMenu(
const ShellIntegration::ShortcutInfo& shortcut_info) {
ShellIntegration::ShortcutLocations creation_locations;
@@ -39,7 +40,8 @@ void CreateShortcutsInApplicationsMenu(
// Create the shortcut in the Chrome Apps subdir.
creation_locations.applications_menu_subdir =
web_app::GetAppShortcutsSubdirName();
- web_app::CreateShortcuts(shortcut_info, creation_locations);
+ web_app::CreateShortcuts(shortcut_info, creation_locations,
+ web_app::DONT_CREATE_DUPLICATE_SHORTCUTS);
}
bool ShouldCreateShortcutFor(const extensions::Extension* extension) {