Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Issue 1533273002: Mac: Don't create shortcuts for hosted apps when they are installed (Closed)

Created:
5 years ago by tapted
Modified:
4 years, 11 months ago
Reviewers:
dominickn
CC:
chromium-reviews, tapted, Matt Giuca, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Don't create shortcuts for hosted apps when they are installed Most noticeably, default apps like Drive, YouTube, etc. appear on chrome://apps and are downloaded and "installed" whenever a new profile is created, and so were getting shortcuts created on Mac. For shortcut creation, Chrome doesn't currently distinguish these "default" installs from things installed from the WebStore. But the logic on Mac was incorrectly triggering shortcut creation for all hosted app installs, which differs from other platforms. On other platforms, shortcuts for hosted apps can only created via chrome://apps, or the bookmark app flow. This has been for happening for new profile creations on Mac since r316113 (m42), since it caused web_app::ShouldCreateShortcutFor() to unconditionally return `true` even for automated codepaths. To fix, skip creation of these hosted app shortcuts on Mac when triggered by AppShortcutManager::OnExtensionWillBeInstalled() by making web_app::ShouldCreateShortcutFor(..) more closely follow other platforms. However, Mac has the problem that shortcuts can break, and require repair, across Chrome versions. To address this, use custom logic in web_app_mac.mm rather than relying on web_app::ShouldCreateShortcutFor(..) for determining what to upgrade, and ensure shortcuts are not newly created during a batch upgrade. When the default app is downloaded and installed on profile creation, a user can still create a shortcut for these by going to chrome://apps and selecting "Create Shortcut..." from the context menu. BUG=571310 TEST=On Mac, create a new profile. Nothing new should appear in `~Applications/Chrome Apps`. (Note this needs an official build: default apps are not installed for Chromium). Committed: https://crrev.com/e5f2cd2dffa0dba08561b04032c8a6221e73826c Cr-Commit-Position: refs/heads/master@{#369325}

Patch Set 1 #

Patch Set 2 : More robust #

Patch Set 3 : Still allow upgrades #

Patch Set 4 : Wow. That is incredibly complicated #

Patch Set 5 : Refine, fix tests. #

Patch Set 6 : Restrict to mac #

Patch Set 7 : Simpler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -7 lines) Patch
M chrome/browser/web_applications/web_app.cc View 1 2 3 4 5 6 1 chunk +20 lines, -4 lines 0 comments Download
M chrome/browser/web_applications/web_app_mac.mm View 1 2 3 4 5 6 6 chunks +37 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (10 generated)
tapted
Hi Dom, please take a look. I think this is the next step in fixing ...
4 years, 11 months ago (2016-01-13 06:22:47 UTC) #8
dominickn
On 2016/01/13 06:22:47, tapted wrote: > Hi Dom, please take a look. I think this ...
4 years, 11 months ago (2016-01-14 00:39:23 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1533273002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1533273002/160001
4 years, 11 months ago (2016-01-14 02:49:48 UTC) #11
commit-bot: I haz the power
Committed patchset #7 (id:160001)
4 years, 11 months ago (2016-01-14 04:37:44 UTC) #13
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 04:38:34 UTC) #15
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e5f2cd2dffa0dba08561b04032c8a6221e73826c
Cr-Commit-Position: refs/heads/master@{#369325}

Powered by Google App Engine
This is Rietveld 408576698