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

Issue 13940006: Remove --show-app-list-shortcut flag and implement new app launcher enable logic. (Closed)

Created:
7 years, 8 months ago by calamity
Modified:
7 years, 8 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, Aaron Boodman, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Remove --show-app-list-shortcut flag and implement new app launcher enable logic. The app launcher now adds itself to the start menu on the first run of chrome past this patch. The webstore enable of the app launcher will create shortcuts on the desktop and pin an icon to the taskbar. The app launcher should never be disabled after it is enabled. BUG=233434 TBR=benwells@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195158

Patch Set 1 #

Total comments: 12

Patch Set 2 : rework #

Patch Set 3 : make start menu shortcut creation happen on enable #

Total comments: 4

Patch Set 4 : remove rest of start menu code #

Total comments: 20
Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -259 lines) Patch
M apps/app_launcher.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M apps/app_launcher.cc View 1 3 chunks +8 lines, -48 lines 0 comments Download
M apps/apps.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M apps/pref_names.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M apps/pref_names.cc View 1 2 3 2 chunks +10 lines, -4 lines 0 comments Download
M apps/prefs.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
D apps/switches.h View 1 chunk +0 lines, -18 lines 0 comments Download
D apps/switches.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_api.cc View 2 chunks +3 lines, -13 lines 0 comments Download
M chrome/browser/shell_integration.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/app_list/app_list_controller_win.cc View 1 2 3 6 chunks +95 lines, -95 lines 10 comments Download
M chrome/browser/web_applications/web_app.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_win.cc View 1 5 chunks +53 lines, -55 lines 10 comments Download

Messages

Total messages: 12 (0 generated)
calamity
The honor of first review is yours.
7 years, 8 months ago (2013-04-16 08:28:03 UTC) #1
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/13940006/diff/1/apps/app_launcher.cc File apps/app_launcher.cc (right): https://chromiumcodereview.appspot.com/13940006/diff/1/apps/app_launcher.cc#newcode65 apps/app_launcher.cc:65: } Add a NOTREACHED() if the callback isn't going ...
7 years, 8 months ago (2013-04-16 22:32:46 UTC) #2
calamity
+sky for OWNERS Can you please review chrome/browser/shell_integration.h? Thanks https://chromiumcodereview.appspot.com/13940006/diff/1/apps/app_launcher.cc File apps/app_launcher.cc (right): https://chromiumcodereview.appspot.com/13940006/diff/1/apps/app_launcher.cc#newcode65 apps/app_launcher.cc:65: ...
7 years, 8 months ago (2013-04-18 01:33:56 UTC) #3
calamity
-sky because he's OOO +ben for OWNERS instead Can you please review chrome/browser/shell_integration.h? Thanks
7 years, 8 months ago (2013-04-18 02:00:38 UTC) #4
Ben Goodger (Google)
lgtm
7 years, 8 months ago (2013-04-18 18:15:48 UTC) #5
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/13940006/diff/19001/apps/pref_names.cc File apps/pref_names.cc (right): https://chromiumcodereview.appspot.com/13940006/diff/19001/apps/pref_names.cc#newcode31 apps/pref_names.cc:31: const char kAppLauncherStartMenuShortcutCreated[] = Is this still necessary? https://chromiumcodereview.appspot.com/13940006/diff/19001/chrome/browser/ui/views/app_list/app_list_controller_win.cc ...
7 years, 8 months ago (2013-04-19 01:39:35 UTC) #6
calamity
https://chromiumcodereview.appspot.com/13940006/diff/19001/apps/pref_names.cc File apps/pref_names.cc (right): https://chromiumcodereview.appspot.com/13940006/diff/19001/apps/pref_names.cc#newcode31 apps/pref_names.cc:31: const char kAppLauncherStartMenuShortcutCreated[] = On 2013/04/19 01:39:35, koz wrote: ...
7 years, 8 months ago (2013-04-19 02:06:03 UTC) #7
koz (OOO until 15th September)
Awesome! lgtm
7 years, 8 months ago (2013-04-19 03:27:16 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/13940006/25001
7 years, 8 months ago (2013-04-19 03:40:32 UTC) #9
commit-bot: I haz the power
Change committed as 195158
7 years, 8 months ago (2013-04-19 13:18:37 UTC) #10
gab
Just saw this CL, did an overview of the shortcut changes. Please try to include ...
7 years, 8 months ago (2013-04-23 17:59:57 UTC) #11
calamity
7 years, 8 months ago (2013-04-26 04:38:49 UTC) #12
Message was sent while issue was closed.
Patch is here: https://codereview.chromium.org/13864015

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
File chrome/browser/ui/views/app_list/app_list_controller_win.cc (right):

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
chrome/browser/ui/views/app_list/app_list_controller_win.cc:111: return
ShellIntegration::GetAppListAppModelIdForProfile(initial_profile_path);
On 2013/04/23 17:59:57, gab wrote:
> FYI, the app_id will need to be suffixed with the unique user suffix used by
the
> Chrome shortcuts now that you will support user-level and system-level AppList
> shortcuts like Chrome (I said that when this code was initially written (by
> benwells@ or huangs@ I think), but was told it was only for user-level for now
> and would be assessed if needed later; well later is now looks like :)!).
> 
> See ShellUtil::GetUserSpecificRegistrySuffix().

I'm not sure if the correct behavior is achieved here simply by appending the
suffix. This suffixed app id is treated as one component and the truncation code
in BuildAppModelId truncates the '.' character out of the app id due to length.

The current code treats Chrome.suffix as 1 component. Isn't this suffix really
its own component?

Change to the shell_integration_win_unittest.cc fails for now due to this.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
chrome/browser/ui/views/app_list/app_list_controller_win.cc:182: return;
On 2013/04/23 17:59:57, gab wrote:
> Since this is a one time call, it should probably make its best-effort to
create
> all shortcuts (i.e. it should "continue" here instead of "return").

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
chrome/browser/ui/views/app_list/app_list_controller_win.cc:189: if (success &&
pin_to_taskbar) {
On 2013/04/23 17:59:57, gab wrote:
> Once again, this should be a "best-effort" basis and pin to taskbar as long as
> the user_data_dir shortcut itself was successfully created (could probably
group
> all the pin_to_taskbar related code together).

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
chrome/browser/ui/views/app_list/app_list_controller_win.cc:192: success =
base::win::TaskbarPinShortcutLink(
On 2013/04/23 17:59:57, gab wrote:
> Why keep track of |success| all the way to the last call, but return void?

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/ui/...
chrome/browser/ui/views/app_list/app_list_controller_win.cc:962:
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
On 2013/04/23 17:59:57, gab wrote:
> This should use BrowserDistribution::GetAppShortCutName() to reflect where the
> installer puts the Chrome shortcut.
> 
> See comments above though, I'm not a fan of the GetShortcutPaths() method as a
> whole, consider using ShellUtil::GetShortcutPath().

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
File chrome/browser/web_applications/web_app_win.cc (right):

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
chrome/browser/web_applications/web_app_win.cc:315: std::vector<base::FilePath>
GetShortcutPaths(
On 2013/04/23 17:59:57, gab wrote:
> These locations are wrong if this is a system-level install (unless you want
the
> user himself to install shortcuts at user-level, but I feel this can get
messy).
> 
> You probably want to use ShellUtil::GetShortcutPath() instead of
re-implementing
> all of this logic here.
Just making sure: if Chrome is a system install, it will be able to create
system shortcuts when it runs right?

Using GetShortcutPath may cause issues for other callers of this code as we
don't always want to create shortcuts in just the "Google Chrome" folder.

I was thinking of adding SHORTCUT_LOCATION_START_MENU_CHROME_DIR which would
automatically append that subdirectory and change it so that
SHORTCUT_LOCATIONS_START_MENU wouldn't. How does that sound?

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
chrome/browser/web_applications/web_app_win.cc:335:
creation_locations.in_quick_launch_bar,
On 2013/04/23 17:59:57, gab wrote:
> Why not simply make this
> creation_locations.in_quick_launch_bar && base::win::GetVersion() <
> base::win::VERSION_WIN7
> instead of special casing it below and skipping it later...?
> 
> In fact, it's even fine to not special case at all (i.e. we do create the
quick
> launch Chrome shortcut on Win7+, there is simply no user facing UI for it in
> Windows itself).

Left the special casing in. Seems messy to create unused shortcuts.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
chrome/browser/web_applications/web_app_win.cc:339: base::PATH_START :
base::DIR_APP_DATA,
On 2013/04/23 17:59:57, gab wrote:
> There is base::DIR_USER_QUICK_LAUNCH, no need for hardcoded subdir below.

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
chrome/browser/web_applications/web_app_win.cc:350: if (locations[i].location_id
== base::PATH_START)
On 2013/04/23 17:59:57, gab wrote:
> Remove this (see comment above).

Done.

https://chromiumcodereview.appspot.com/13940006/diff/25001/chrome/browser/web...
chrome/browser/web_applications/web_app_win.cc:354: continue;
On 2013/04/23 17:59:57, gab wrote:
> +
> NOTREACHED();

Done.

Powered by Google App Engine
This is Rietveld 408576698