Windows: When an app is updated and its name changes, recreate shortcuts.
This searches for shortcuts in the usual locations containing the app's old
name, deletes them, and creates new shortcuts in the places where there were
pre-existing shortcuts.
BUG=153981
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202712
7 years, 7 months ago
(2013-05-15 09:52:20 UTC)
#1
benwells
Sam, can you take a first pass through this? https://codereview.chromium.org/14993013/diff/7001/chrome/common/extensions/extension.h File chrome/common/extensions/extension.h (right): https://codereview.chromium.org/14993013/diff/7001/chrome/common/extensions/extension.h#newcode680 chrome/common/extensions/extension.h:680: ...
7 years, 7 months ago
(2013-05-16 04:30:59 UTC)
#2
https://codereview.chromium.org/14993013/diff/7001/chrome/browser/web_applications/web_app_win.cc File chrome/browser/web_applications/web_app_win.cc (right): https://codereview.chromium.org/14993013/diff/7001/chrome/browser/web_applications/web_app_win.cc#newcode352 chrome/browser/web_applications/web_app_win.cc:352: // will not be renamed, but at least it ...
7 years, 7 months ago
(2013-05-16 06:40:23 UTC)
#3
https://codereview.chromium.org/14993013/diff/7001/chrome/browser/web_applica...
File chrome/browser/web_applications/web_app_win.cc (right):
https://codereview.chromium.org/14993013/diff/7001/chrome/browser/web_applica...
chrome/browser/web_applications/web_app_win.cc:352: // will not be renamed, but
at least it will continue to work.
This is not ideal, but I want to leave it as-is for now, and I will file a
separate low-priority bug about it. The consequences of not fixing this are
simply that if the user right-clicks or tooltips the pinned shortcut, they will
see the old name. I don't consider this as important as the Start Menu shortcut,
where the text is shown directly to the user.
koz (OOO until 15th September)
Random drive-by nits for you :-) https://codereview.chromium.org/14993013/diff/7001/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): https://codereview.chromium.org/14993013/diff/7001/chrome/browser/extensions/extension_service.cc#newcode2434 chrome/browser/extensions/extension_service.cc:2434: if (existing_extension != ...
7 years, 7 months ago
(2013-05-17 01:36:18 UTC)
#4
benwells: I think it's ready for you to look at now. https://codereview.chromium.org/14993013/diff/41001/chrome/browser/extensions/extension_service_unittest.cc File chrome/browser/extensions/extension_service_unittest.cc (right): ...
7 years, 7 months ago
(2013-05-28 00:41:15 UTC)
#8
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc File chrome/browser/web_applications/web_app_win.cc (right): https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc#newcode230 chrome/browser/web_applications/web_app_win.cc:230: void GetShortcutLocationsAndDeleteShortcuts( This was renamed at Sam's request: the ...
7 years, 7 months ago
(2013-05-28 01:09:14 UTC)
#9
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
File chrome/browser/web_applications/web_app_win.cc (right):
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
chrome/browser/web_applications/web_app_win.cc:230: void
GetShortcutLocationsAndDeleteShortcuts(
This was renamed at Sam's request: the new name is clearer about what two
operations this does, and doesn't imply that it "remembers" shortcuts as some
kind of side effect.
Note that we discussed breaking this up into two functions, but decided it
wasn't worth it, as that would involve redundant calls to
MatchingShortcutsForProfileAndExtension.
I also changed the arguments: instead of taking a |shortcut_info|, it now just
takes |profile_path|. This clears up the confusion of the old one, which would
ignore |shortcut_info.title| in favour of the |title| argument.
benwells
lgtm https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc File chrome/browser/web_applications/web_app_win.cc (right): https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc#newcode230 chrome/browser/web_applications/web_app_win.cc:230: void GetShortcutLocationsAndDeleteShortcuts( On 2013/05/28 01:09:14, Matt Giuca wrote: ...
7 years, 7 months ago
(2013-05-28 02:14:07 UTC)
#10
lgtm
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
File chrome/browser/web_applications/web_app_win.cc (right):
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
chrome/browser/web_applications/web_app_win.cc:230: void
GetShortcutLocationsAndDeleteShortcuts(
On 2013/05/28 01:09:14, Matt Giuca wrote:
> This was renamed at Sam's request: the new name is clearer about what two
> operations this does, and doesn't imply that it "remembers" shortcuts as some
> kind of side effect.
>
> Note that we discussed breaking this up into two functions, but decided it
> wasn't worth it, as that would involve redundant calls to
> MatchingShortcutsForProfileAndExtension.
>
> I also changed the arguments: instead of taking a |shortcut_info|, it now just
> takes |profile_path|. This clears up the confusion of the old one, which would
> ignore |shortcut_info.title| in favour of the |title| argument.
Could you add a comment somewhere that duplicates will be deleted but only one
path returned for duplicates in the same folder?
https://codereview.chromium.org/14993013/diff/62001/chrome/common/extensions/...
File chrome/common/extensions/extension.h (right):
https://codereview.chromium.org/14993013/diff/62001/chrome/common/extensions/...
chrome/common/extensions/extension.h:560: InstalledExtensionInfo(const
Extension* extension, bool is_update,
Nit: one line per parameter.
Matt Giuca
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc File chrome/browser/web_applications/web_app_win.cc (right): https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applications/web_app_win.cc#newcode230 chrome/browser/web_applications/web_app_win.cc:230: void GetShortcutLocationsAndDeleteShortcuts( On 2013/05/28 02:14:07, benwells wrote: > On ...
7 years, 7 months ago
(2013-05-28 03:10:06 UTC)
#11
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
File chrome/browser/web_applications/web_app_win.cc (right):
https://codereview.chromium.org/14993013/diff/62001/chrome/browser/web_applic...
chrome/browser/web_applications/web_app_win.cc:230: void
GetShortcutLocationsAndDeleteShortcuts(
On 2013/05/28 02:14:07, benwells wrote:
> On 2013/05/28 01:09:14, Matt Giuca wrote:
> > This was renamed at Sam's request: the new name is clearer about what two
> > operations this does, and doesn't imply that it "remembers" shortcuts as
some
> > kind of side effect.
> >
> > Note that we discussed breaking this up into two functions, but decided it
> > wasn't worth it, as that would involve redundant calls to
> > MatchingShortcutsForProfileAndExtension.
> >
> > I also changed the arguments: instead of taking a |shortcut_info|, it now
just
> > takes |profile_path|. This clears up the confusion of the old one, which
would
> > ignore |shortcut_info.title| in favour of the |title| argument.
>
> Could you add a comment somewhere that duplicates will be deleted but only one
> path returned for duplicates in the same folder?
Done.
https://codereview.chromium.org/14993013/diff/62001/chrome/common/extensions/...
File chrome/common/extensions/extension.h (right):
https://codereview.chromium.org/14993013/diff/62001/chrome/common/extensions/...
chrome/common/extensions/extension.h:560: InstalledExtensionInfo(const
Extension* extension, bool is_update,
On 2013/05/28 02:14:07, benwells wrote:
> Nit: one line per parameter.
Done.
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/14993013/70001
7 years, 7 months ago
(2013-05-28 03:10:22 UTC)
#12
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=118854
7 years, 6 months ago
(2013-05-28 05:29:39 UTC)
#13
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=118894
7 years, 6 months ago
(2013-05-28 08:17:32 UTC)
#15
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=118942
7 years, 6 months ago
(2013-05-28 10:14:40 UTC)
#17
Issue 14993013: Windows: When an app is updated and its name changes, recreate shortcuts.
(Closed)
Created 7 years, 7 months ago by Matt Giuca
Modified 7 years, 6 months ago
Reviewers: benwells, Sam McNally, koz (OOO until 15th September), commit-bot: I haz the power
Base URL: http://git.chromium.org/chromium/src.git@master
Comments: 23