New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 751029 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Long OOO (go/where-is-mgiuca)
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Delete --app old-style app shortcuts feature

Project Member Reported by mgiuca@chromium.org, Aug 1 2017

Issue description

Chrome Version: 61
OS: Win, Linux, Mac

"New bookmark apps" have been enabled everywhere except Mac since 2015 (r327829). I believe they are *still* disabled on Mac which means we can't remove all the code for the old apps, but we can clean up the Linux and Windows code (the disable flag was even removed on Windows and Linux in r459209).

Background: The "old bookmark apps" were very simple. They did not create an extension or any state in the browser itself, they simply added a shortcut to the user's desktop with "--app=<url>". When Chrome is run with "--app=<url>", it opens that URL in a special window so it feels like an app. New bookmarks do not use the --app command-line flag and I believe they don't share the same windowing code either.

It hasn't been possible to create such a shortcut (without a flag) on Windows or Linux for 2 years, but there may still be such shortcuts on people's desktops which they rely on, so we have to be careful. We also have to consider Mac. However, we can surely remove the code for creating and updating these --app shortcuts (UpdateShortcutWorker on Windows).

I would suggest that we keep --app in perpetuity but make it simply open the URL in a browser tab (just as if it was a command-line argument without --app). If we want to do something fancier, we could upgrade it into a new bookmark app.
 
Looks like there is a bunch of usage of --app URLs for launching (either from app shortcuts that were created pre-2015, or from custom launching from the command line). The question is whether we are OK to convert those launches into regular tab launches. I think we have 4 options:

1. Do nothing. Keep the --app feature working and shortcut updating.
2. Remove the shortcut update code, but preserve --app launching in a special app window.
3. Change --app to just open the URL in a browser tab.
4. Have --app create a bookmark app (if it doesn't already exist) and run it.

Owen, do you have an opinion? I think #4 is a bit weird since it will have subtly different behaviour and it may be changing as we iterate on Desktop PWAs. I would be in favour of #3 but if you think we need to preserve the app window behaviour, we can go with #2.
Cc: owe...@chromium.org
+owencm
It seems that if a number of users are launching web apps in windows via this today that it's a shame to break them.

Do you see a reasonable path to having --app still launch things in their own windows without Code Insanity (TM)?

Also, if option #4 means these will change slightly as we iterate on desktop PWAs (e.g. window frame, linking etc) then I think it's pretty reasonable for old --app shortcuts to also get these changes.
Yes, it's just crufty code (not a priority to remove). I do think we should remove the shortcut update code, though.

So the decision would be #2 for now, #4 later. Avoid #3 because it breaks too much.
The updating stuff should definitely be killed as it adds significant complexity.

For launching ... there is no need to remove the code now but we should remove it at some point. The introduction of a big new system for launching apps seems like an opportune time.

I'd support option #4. It would also be great to understand usage more (e.g. is this usage from automated testing, if so why do they use it, etc.).
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/532b75db7ff01611f18e1ebe4f1783985e850a5b

commit 532b75db7ff01611f18e1ebe4f1783985e850a5b
Author: Matt Giuca <mgiuca@chromium.org>
Date: Wed Aug 16 02:21:10 2017

Added browser test for --app command-line flag.

This feature is slated for deletion, but we can't delete it until we
have a migration for --app shortcuts. In the mean time, adding a
long-needed test.

Bug: 751029
Change-Id: Id159469b9ac110ba2bb7b8627be326ae3c36fca0
Reviewed-on: https://chromium-review.googlesource.com/611841
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494672}
[modify] https://crrev.com/532b75db7ff01611f18e1ebe4f1783985e850a5b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9629e9d8697b65c5ff5a73166eacf7b603365ab4

commit 9629e9d8697b65c5ff5a73166eacf7b603365ab4
Author: Matt Giuca <mgiuca@chromium.org>
Date: Tue Aug 29 01:44:46 2017

Windows: Remove app shortcut update logic.

This only affects old-style "--app" shortcuts that were created from
"Add to Desktop" before 2015 (when old-style shortcuts were replaced
with Bookmark Apps, using the extension system). For now, --app
shortcuts will continue to work, but will no longer update their title
and icon from the current web page every time the shortcut is launched.

Bug: 751029
Change-Id: Idc53fc1c77412c8457ab7cfba45cb3c8836a7715
Reviewed-on: https://chromium-review.googlesource.com/611741
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497979}
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/build/android/pylib/gtest/filter/unit_tests_disabled
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/extensions/BUILD.gn
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/extensions/tab_helper.cc
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/extensions/tab_helper.h
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/ui/extensions/application_launch.cc
[delete] https://crrev.com/d5d29a26c366c2cae17a849290c877993ac7f28c/chrome/browser/web_applications/update_shortcut_worker_win.cc
[delete] https://crrev.com/d5d29a26c366c2cae17a849290c877993ac7f28c/chrome/browser/web_applications/update_shortcut_worker_win.h
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/web_applications/web_app.cc
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/web_applications/web_app.h
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/web_applications/web_app_unittest.cc
[modify] https://crrev.com/9629e9d8697b65c5ff5a73166eacf7b603365ab4/chrome/browser/web_applications/web_app_win.cc

Components: UI>Browser>WebAppInstalls

Sign in to add a comment