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

Issue 263403002: Replace OnceOffCreateShortcuts with UpdateShortcutsForAllAppsIfNeeded. (Closed)

Created:
6 years, 7 months ago by jackhou1
Modified:
6 years, 6 months ago
Reviewers:
tapted, calamity, Matt Giuca
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina
Visibility:
Public.

Description

Replace OnceOffCreateShortcuts with UpdateShortcutsForAllAppsIfNeeded. The once-off creation logic is no longer needed as app shortcuts have been enabled by default for a while. This replaces kAppShortcutsHaveBeenCreated with kAppShortcutsVersion and allows us to trigger a rebuild of all app shortcuts. This is only implemented for Mac. BUG=266725 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274498

Patch Set 1 #

Total comments: 7

Patch Set 2 : Sync and rebase #

Patch Set 3 : Remove once-off creation logic. #

Total comments: 12

Patch Set 4 : Sync and rebase #

Patch Set 5 : Address comments #

Patch Set 6 : Address comments #

Total comments: 3

Patch Set 7 : Check all extensions, not just enabled. #

Total comments: 4

Patch Set 8 : Sync and rebase #

Patch Set 9 : Remove CallForProfileAndAppId, change Mac implementation to Update instead of Create #

Total comments: 4

Patch Set 10 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -42 lines) Patch
M chrome/browser/apps/shortcut_manager.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/apps/shortcut_manager.cc View 1 2 3 4 5 6 7 8 9 6 chunks +26 lines, -28 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_service_impl.cc View 1 2 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/web_applications/web_app.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app.cc View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_chromeos.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_linux.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_mac.mm View 1 2 3 4 5 6 7 8 9 3 chunks +24 lines, -0 lines 0 comments Download
M chrome/browser/web_applications/web_app_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
jackhou1
What do you guys think of this approach? Is is sufficient for your needs on ...
6 years, 7 months ago (2014-05-06 08:15:46 UTC) #1
Matt Giuca
Yeah looks like a good approach. See a few comments. But I didn't do a ...
6 years, 7 months ago (2014-05-07 05:21:51 UTC) #2
calamity
https://codereview.chromium.org/263403002/diff/1/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (right): https://codereview.chromium.org/263403002/diff/1/chrome/browser/apps/shortcut_manager.cc#newcode160 chrome/browser/apps/shortcut_manager.cc:160: web_app::UpdateShortcutsForAllApps(profile_); Maybe this should support a callback so that ...
6 years, 7 months ago (2014-05-07 06:00:18 UTC) #3
jackhou1
PTAL The once-off code is gone. There's no default implementation for UpdateShortcutsForAllAppsForProfile. On Mac, it ...
6 years, 7 months ago (2014-05-22 05:26:46 UTC) #4
Matt Giuca
Handful of small nits. LGTM. https://codereview.chromium.org/263403002/diff/40001/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (right): https://codereview.chromium.org/263403002/diff/40001/chrome/browser/apps/shortcut_manager.cc#newcode37 chrome/browser/apps/shortcut_manager.cc:37: // shortcuts like command ...
6 years, 7 months ago (2014-05-23 07:01:57 UTC) #5
jackhou1
https://codereview.chromium.org/263403002/diff/40001/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (right): https://codereview.chromium.org/263403002/diff/40001/chrome/browser/apps/shortcut_manager.cc#newcode37 chrome/browser/apps/shortcut_manager.cc:37: // shortcuts like command line flags or associated icons, ...
6 years, 7 months ago (2014-05-26 07:57:36 UTC) #6
jackhou1
calamity, did you have any more comments?
6 years, 7 months ago (2014-05-26 07:58:49 UTC) #7
Matt Giuca
https://codereview.chromium.org/263403002/diff/40001/chrome/browser/ui/app_list/app_list_service_impl.cc File chrome/browser/ui/app_list/app_list_service_impl.cc (right): https://codereview.chromium.org/263403002/diff/40001/chrome/browser/ui/app_list/app_list_service_impl.cc#newcode347 chrome/browser/ui/app_list/app_list_service_impl.cc:347: } Yeah would you be able to split it, ...
6 years, 7 months ago (2014-05-26 08:07:35 UTC) #8
jackhou1
https://codereview.chromium.org/263403002/diff/40001/chrome/browser/ui/app_list/app_list_service_impl.cc File chrome/browser/ui/app_list/app_list_service_impl.cc (right): https://codereview.chromium.org/263403002/diff/40001/chrome/browser/ui/app_list/app_list_service_impl.cc#newcode347 chrome/browser/ui/app_list/app_list_service_impl.cc:347: } On 2014/05/26 08:07:36, Matt Giuca wrote: > Yeah ...
6 years, 7 months ago (2014-05-27 01:03:57 UTC) #9
Matt Giuca
SLGTM
6 years, 7 months ago (2014-05-27 01:14:52 UTC) #10
calamity
https://codereview.chromium.org/263403002/diff/100001/chrome/browser/web_applications/web_app.cc File chrome/browser/web_applications/web_app.cc (right): https://codereview.chromium.org/263403002/diff/100001/chrome/browser/web_applications/web_app.cc#newcode232 chrome/browser/web_applications/web_app.cc:232: app_id, extensions::ExtensionRegistry::ENABLED); Shouldn't we be excluding disabled/terminated extensions?
6 years, 6 months ago (2014-05-29 03:03:09 UTC) #11
jackhou1
https://codereview.chromium.org/263403002/diff/100001/chrome/browser/web_applications/web_app.cc File chrome/browser/web_applications/web_app.cc (right): https://codereview.chromium.org/263403002/diff/100001/chrome/browser/web_applications/web_app.cc#newcode232 chrome/browser/web_applications/web_app.cc:232: app_id, extensions::ExtensionRegistry::ENABLED); On 2014/05/29 03:03:10, calamity wrote: > Shouldn't ...
6 years, 6 months ago (2014-05-29 04:23:46 UTC) #12
calamity
lgtm
6 years, 6 months ago (2014-05-29 05:53:27 UTC) #13
jackhou1
tapted, could you review: chrome/browser/ui/app_list/app_list_service_impl.cc also, for OWNERS: chrome/browser/apps/shortcut_manager.h chrome/browser/apps/shortcut_manager.cc
6 years, 6 months ago (2014-05-29 05:54:10 UTC) #14
tapted
I thought it was really weird why ShortcutOperationCallback existed at all, and this wasn't all ...
6 years, 6 months ago (2014-05-29 08:56:40 UTC) #15
tapted
https://codereview.chromium.org/263403002/diff/120001/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (left): https://codereview.chromium.org/263403002/diff/120001/chrome/browser/apps/shortcut_manager.cc#oldcode146 chrome/browser/apps/shortcut_manager.cc:146: if (prefs_->GetBoolean(prefs::kAppShortcutsHaveBeenCreated)) On 2014/05/29 08:56:40, tapted wrote: > Is ...
6 years, 6 months ago (2014-05-29 13:07:43 UTC) #16
jackhou1
> It might be better to make a > non-generic version now, and make it ...
6 years, 6 months ago (2014-05-30 04:38:52 UTC) #17
tapted
https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (right): https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc#newcode37 chrome/browser/apps/shortcut_manager.cc:37: const int kCurrentAppShortcutsVersion = 1; Note we might want ...
6 years, 6 months ago (2014-05-30 06:33:27 UTC) #18
tapted
On 2014/05/30 06:33:27, tapted wrote: > https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc > File chrome/browser/apps/shortcut_manager.cc (right): > > https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc#newcode37 > ...
6 years, 6 months ago (2014-05-30 06:38:17 UTC) #19
jackhou1
tapted, PTAL https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc File chrome/browser/apps/shortcut_manager.cc (right): https://codereview.chromium.org/263403002/diff/150001/chrome/browser/apps/shortcut_manager.cc#newcode37 chrome/browser/apps/shortcut_manager.cc:37: const int kCurrentAppShortcutsVersion = 1; On 2014/05/30 ...
6 years, 6 months ago (2014-06-02 04:25:19 UTC) #20
tapted
lgtm
6 years, 6 months ago (2014-06-02 05:49:14 UTC) #21
jackhou1
The CQ bit was checked by jackhou@chromium.org
6 years, 6 months ago (2014-06-03 04:21:24 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/263403002/170001
6 years, 6 months ago (2014-06-03 04:23:42 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-03 06:14:15 UTC) #24
commit-bot: I haz the power
6 years, 6 months ago (2014-06-03 13:08:43 UTC) #25
Message was sent while issue was closed.
Change committed as 274498

Powered by Google App Engine
This is Rietveld 408576698