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

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed)

Created:
7 years, 10 months ago by tapted
Modified:
7 years, 10 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, sadrul, ben+watch_chromium.org, tfarina, sail+watch_chromium.org, Aaron Boodman, pam+watch_chromium.org, chromium-apps-reviews_chromium.org, koz (OOO until 15th September), chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactor app_list_util.h into AppListService abstract base. AppList usage is often guarded by an #ifdef ENABLE_APP_LIST, which adds fragility and reduces clarity. AppList is now enabled by default on chromeos, win, and mac. We also want to support multiple desktop types, e.g. for win+ash, where access to two app list controllers is required, depending on the current desktop type. This change adds an AppListService abstract base, and refactors much of the current clutter around AppList calls. BUG=138632, 138633, 174950 TEST=app_list_controller_browsertest.cc . Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=184894

Patch Set 1 #

Patch Set 2 : linter #

Patch Set 3 : fix some obvious dumbs #

Total comments: 37

Patch Set 4 : rebase and fix compile on OSX #

Patch Set 5 : chrome builds on Windows, next: fix browsertest #

Total comments: 1

Patch Set 6 : fixes cocoa, back to windows #

Total comments: 18

Patch Set 7 : fix Win-Aura, and enable the browser tests there. next: chromeos #

Patch Set 8 : fix chromeos #

Patch Set 9 : fix DEPS, split service providers. next: check cocoa, chromeos #

Total comments: 5

Patch Set 10 : fix some build problems maybe #

Total comments: 13

Patch Set 11 : respond to comments #

Patch Set 12 : stray newline #

Total comments: 13

Patch Set 13 : comments, remove AppListServiceAshImpl #

Patch Set 14 : alternative to intermediate class #

Total comments: 10

Patch Set 15 : rebase (conflicts in webstore_private_api.cc) #

Total comments: 24

Patch Set 16 : rebase again #

Patch Set 17 : address comments, avoid at_exit work #

Total comments: 4

Patch Set 18 : garrrrrrrrrrrrrrr missing comma #

Patch Set 19 : move disabled to selector #

Total comments: 6

Patch Set 20 : fix app_list_service_selector.cc to allow enable_app_list=0 to work properly on platforms that defa… #

Patch Set 21 : add todos, un-nest ifdefs #

Patch Set 22 : missing OVERRIDE, function order from rebase, nit gyp #

Total comments: 2

Patch Set 23 : remove path abbreviations #

Patch Set 24 : rebase for r184604=r184636 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+500 lines, -319 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/app_list/app_list_controller_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +21 lines, -19 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_ash.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_disabled.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_disabled.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_selector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/ui/app_list/app_list_service_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -0 lines 0 comments Download
D chrome/browser/ui/app_list/app_list_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -48 lines 0 comments Download
D chrome/browser/ui/app_list/app_list_util.cc View 1 2 3 1 chunk +0 lines, -51 lines 0 comments Download
M chrome/browser/ui/ash/app_list/app_list_controller_ash.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +0 lines, -25 lines 0 comments Download
A chrome/browser/ui/ash/app_list/app_list_service_ash.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +68 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +33 lines, -36 lines 0 comments Download
M chrome/browser/ui/extensions/extension_install_ui_default.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/app_list/app_list_controller_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 11 chunks +54 lines, -105 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +18 lines, -3 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
tapted
Added some notes and removed CCs since this is just for brainstorming. CCs: chromium-reviews@chromium.org, dbeam+watch-options@chromium.org, ...
7 years, 10 months ago (2013-02-11 04:04:20 UTC) #1
benwells
Overall approach looks nice. Some initial comments. https://codereview.chromium.org/12207104/diff/20/chrome/browser/ui/app_list_service.cc File chrome/browser/ui/app_list_service.cc (right): https://codereview.chromium.org/12207104/diff/20/chrome/browser/ui/app_list_service.cc#newcode32 chrome/browser/ui/app_list_service.cc:32: AppListService* AppListService::GetDisabled() ...
7 years, 10 months ago (2013-02-11 04:12:32 UTC) #2
koz (OOO until 15th September)
Cool change! So, just so we're straight, we have this idea that there is only ...
7 years, 10 months ago (2013-02-11 04:33:37 UTC) #3
tapted
On 2013/02/11 04:33:37, koz wrote: > So, just so we're straight, we have this idea ...
7 years, 10 months ago (2013-02-11 05:35:11 UTC) #4
benwells
https://codereview.chromium.org/12207104/diff/20/chrome/browser/ui/app_list_service.h File chrome/browser/ui/app_list_service.h (right): https://codereview.chromium.org/12207104/diff/20/chrome/browser/ui/app_list_service.h#newcode27 chrome/browser/ui/app_list_service.h:27: static AppListService* GetDisabled(); On 2013/02/11 05:35:11, tapted wrote: > ...
7 years, 10 months ago (2013-02-11 05:52:36 UTC) #5
tapted
Windows is in! still on the agenda: fix tests, chromeos (and cocoa needs a revisit ...
7 years, 10 months ago (2013-02-18 07:05:39 UTC) #6
tapted
Cocoa is back. Not sure what to do with that DEPS problem on c/b/ui/views -- ...
7 years, 10 months ago (2013-02-18 07:52:43 UTC) #7
benwells
Let's talk tomorrow about how not to break DEPS. I have a plan :D https://codereview.chromium.org/12207104/diff/16019/chrome/browser/ui/app_list_service.h ...
7 years, 10 months ago (2013-02-18 08:31:30 UTC) #8
tapted
On 2013/02/18 08:31:30, benwells wrote: > Let's talk tomorrow about how not to break DEPS. ...
7 years, 10 months ago (2013-02-18 10:27:55 UTC) #9
benwells
Just too lazy to type it all up... https://codereview.chromium.org/12207104/diff/16019/chrome/browser/ui/ash/app_list/app_list_controller_ash.h File chrome/browser/ui/ash/app_list/app_list_controller_ash.h (right): https://codereview.chromium.org/12207104/diff/16019/chrome/browser/ui/ash/app_list/app_list_controller_ash.h#newcode13 chrome/browser/ui/ash/app_list/app_list_controller_ash.h:13: template ...
7 years, 10 months ago (2013-02-18 10:36:17 UTC) #10
koz (OOO until 15th September)
https://codereview.chromium.org/12207104/diff/16019/chrome/browser/ui/app_list_service.cc File chrome/browser/ui/app_list_service.cc (right): https://codereview.chromium.org/12207104/diff/16019/chrome/browser/ui/app_list_service.cc#newcode58 chrome/browser/ui/app_list_service.cc:58: return AppListControllerAsh::GetInstance(); The ash branch only returns if the ...
7 years, 10 months ago (2013-02-19 00:08:09 UTC) #11
tapted
This is the version with the "selector" and some gypdeffery (which I still need to ...
7 years, 10 months ago (2013-02-19 03:15:32 UTC) #12
tapted
patch set 10 might fix some build problems. https://codereview.chromium.org/12207104/diff/20006/chrome/browser/ui/app_list/app_list_service_ash.h File chrome/browser/ui/app_list/app_list_service_ash.h (right): https://codereview.chromium.org/12207104/diff/20006/chrome/browser/ui/app_list/app_list_service_ash.h#newcode10 chrome/browser/ui/app_list/app_list_service_ash.h:10: class ...
7 years, 10 months ago (2013-02-19 03:35:06 UTC) #13
benwells
This is looking really good. It will get simpler after https://codereview.chromium.org/12298015/ lands. https://codereview.chromium.org/12207104/diff/22024/chrome/browser/ui/app_list/app_list_service.cc File chrome/browser/ui/app_list/app_list_service.cc ...
7 years, 10 months ago (2013-02-19 03:49:42 UTC) #14
koz (OOO until 15th September)
https://codereview.chromium.org/12207104/diff/20006/chrome/browser/ui/app_list/app_list_service_selector.cc File chrome/browser/ui/app_list/app_list_service_selector.cc (right): https://codereview.chromium.org/12207104/diff/20006/chrome/browser/ui/app_list/app_list_service_selector.cc#newcode8 chrome/browser/ui/app_list/app_list_service_selector.cc:8: #if defined(USE_ASH) On 2013/02/19 03:35:06, tapted wrote: > so.... ...
7 years, 10 months ago (2013-02-19 03:55:14 UTC) #15
tapted
https://codereview.chromium.org/12207104/diff/22024/chrome/browser/ui/app_list/app_list_service.cc File chrome/browser/ui/app_list/app_list_service.cc (right): https://codereview.chromium.org/12207104/diff/22024/chrome/browser/ui/app_list/app_list_service.cc#newcode70 chrome/browser/ui/app_list/app_list_service.cc:70: void AppListService::OnProfileAdded(const base::FilePath& profilePath) {} On 2013/02/19 03:49:42, benwells ...
7 years, 10 months ago (2013-02-19 04:25:21 UTC) #16
benwells
Comment for AppListServiceAshImpl also applies for win and cocoa. Also, I noticed we have app_list_service_ash.cc ...
7 years, 10 months ago (2013-02-19 07:34:28 UTC) #17
tfarina
https://codereview.chromium.org/12207104/diff/17043/chrome/browser/ui/app_list/app_list_service_cocoa.h File chrome/browser/ui/app_list/app_list_service_cocoa.h (right): https://codereview.chromium.org/12207104/diff/17043/chrome/browser/ui/app_list/app_list_service_cocoa.h#newcode5 chrome/browser/ui/app_list/app_list_service_cocoa.h:5: #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_H_ what is this file doing here? Can ...
7 years, 10 months ago (2013-02-20 03:29:44 UTC) #18
tfarina
This is referencing crbug.com/174950. Is it the right bug for this change? It's already closed/fixed.
7 years, 10 months ago (2013-02-20 03:33:01 UTC) #19
tapted
Still need to poke around on chromeos to get the test working there. On 2013/02/20 ...
7 years, 10 months ago (2013-02-20 04:15:06 UTC) #20
tapted
patchset 14 is an alternative that takes the class static member functions out into regular ...
7 years, 10 months ago (2013-02-20 12:03:42 UTC) #21
benwells
Am liking it, very close now. https://codereview.chromium.org/12207104/diff/32005/chrome/browser/ui/app_list/app_list_service.cc File chrome/browser/ui/app_list/app_list_service.cc (right): https://codereview.chromium.org/12207104/diff/32005/chrome/browser/ui/app_list/app_list_service.cc#newcode15 chrome/browser/ui/app_list/app_list_service.cc:15: base::FilePath AppListService::GetAppListProfilePath( I'm ...
7 years, 10 months ago (2013-02-21 04:34:36 UTC) #22
tfarina
https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service.h File chrome/browser/ui/app_list/app_list_service.h (right): https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service.h#newcode14 chrome/browser/ui/app_list/app_list_service.h:14: class PrefRegistrySimple; sort https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service.h#newcode15 chrome/browser/ui/app_list/app_list_service.h:15: class Profile; duplicated https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service.h#newcode28 ...
7 years, 10 months ago (2013-02-21 22:59:09 UTC) #23
tfarina
https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service_ash.h File chrome/browser/ui/app_list/app_list_service_ash.h (right): https://codereview.chromium.org/12207104/diff/45050/chrome/browser/ui/app_list/app_list_service_ash.h#newcode12 chrome/browser/ui/app_list/app_list_service_ash.h:12: AppListService* GetAppListServiceAsh(); Lets not do this way. It's better ...
7 years, 10 months ago (2013-02-21 23:04:44 UTC) #24
tapted
Addressed comments, and switched so that "Leaky" singletons are used, to match the old lazy_instance ...
7 years, 10 months ago (2013-02-25 07:09:21 UTC) #25
tapted
(some notes for patchset 17) https://codereview.chromium.org/12207104/diff/37055/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/12207104/diff/37055/chrome/browser/chrome_browser_main.cc#newcode346 chrome/browser/chrome_browser_main.cc:346: return AppListService::Get()->GetAppListProfilePath(user_data_dir); note: now ...
7 years, 10 months ago (2013-02-25 07:18:05 UTC) #26
tapted
Pretty sure this will conflict with http://crrev.com/12298015 so I predict another rebase. On 2013/02/25 07:09:21, ...
7 years, 10 months ago (2013-02-26 00:26:56 UTC) #27
benwells
lgtm with nits and the disabled selector thing fixed. https://codereview.chromium.org/12207104/diff/36063/chrome/browser/ui/app_list/app_list_service_selector.cc File chrome/browser/ui/app_list/app_list_service_selector.cc (right): https://codereview.chromium.org/12207104/diff/36063/chrome/browser/ui/app_list/app_list_service_selector.cc#newcode25 chrome/browser/ui/app_list/app_list_service_selector.cc:25: ...
7 years, 10 months ago (2013-02-26 01:18:25 UTC) #28
tapted
+sky for OWNERS, please take a look (mostly removing #ifdefs) - c/b/{chrome_browser_main.cc, startup/*} - c/b/prefs ...
7 years, 10 months ago (2013-02-26 03:04:34 UTC) #29
sail
cocoa/* LGTM https://codereview.chromium.org/12207104/diff/38008/chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm File chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm (right): https://codereview.chromium.org/12207104/diff/38008/chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm#newcode26 chrome/browser/ui/cocoa/app_list/app_list_controller_cocoa.mm:26: // TODO(tapted): Move entire file to /c/b/ui/app_list/app_list_service_mac.cc ...
7 years, 10 months ago (2013-02-26 03:08:36 UTC) #30
sky
LGTM
7 years, 10 months ago (2013-02-26 15:46:53 UTC) #31
tapted
Rebase looks happy, trybots run against head (lkgr is still ~25 hours old, but CQ ...
7 years, 10 months ago (2013-02-27 04:53:59 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/12207104/46026
7 years, 10 months ago (2013-02-27 04:55:09 UTC) #33
commit-bot: I haz the power
7 years, 10 months ago (2013-02-27 06:03:00 UTC) #34
Message was sent while issue was closed.
Change committed as 184894

Powered by Google App Engine
This is Rietveld 408576698