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

Issue 2488573002: Refactor getInstalledRelatedApps code and add manifest logic and tests. (Closed)

Created:
4 years, 1 month ago by Matt Giuca
Modified:
3 years, 10 months ago
Reviewers:
haraken, esprehn
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, benwells, blink-reviews, chrome-apps-syd-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor getInstalledRelatedApps code and add manifest logic and tests. This changes the architecture of getInstalledRelatedApps for "onion soup". Under the previous (unfinished) architecture, InstalledAppController (Blink) would call WebInstalledAppClient::getInstalledRelatedApps (content/renderer) which was planned to get the related apps from the manifest, then call a Mojo service in the browser to filter the apps. This CL renames WebInstalledAppClient to WebRelatedAppsFetcher, and now its job is *only* to get the related apps from the manifest (not talk to the browser) and return it to InstalledAppController. InstalledAppController will (in a future CL) get the browser to filter the apps. This CL also implements the concrete RelatedAppsFetcher in content/renderer which actually gets the related apps from the manifest, and adds layout tests for the API. Manifest code based on CL by dhnishi: https://codereview.chromium.org/1756793004/ BUG=587623 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2488573002 Cr-Commit-Position: refs/heads/master@{#450868} Committed: https://chromium.googlesource.com/chromium/src/+/be2c7115703a6610b25128809eb388ac28d07285

Patch Set 1 : Import from https://codereview.chromium.org/2461303002/ #

Patch Set 2 : Progress towards making it compile (Linux, but not Android). #

Patch Set 3 : Rebase. #

Patch Set 4 : Made it compile on Android. #

Patch Set 5 : Bind interface (but crashes on usage). #

Patch Set 6 : Rebase. #

Patch Set 7 : Fix crash and work on Android. #

Patch Set 8 : Hook up properly on Android. #

Patch Set 9 : Register via C on Android. Now works. #

Patch Set 10 : Rebase. #

Patch Set 11 : Update Copyright year to 2017. #

Patch Set 12 : Minor. #

Patch Set 13 : Fix tests. #

Patch Set 14 : Starting to resolve presubmit and added some comments. #

Patch Set 15 : Major refactor: Move InstalledAppDispatcher into Blink (fold into InstalledAppController). #

Patch Set 16 : Remove Android implementation (save for follow-up CL). #

Patch Set 17 : Resolve most of the presubmit issues (introduces probably-unacceptable DEPS exception). #

Patch Set 18 : Major refactor around DEPS -- restored much of the original complexity but kept Mojo logic in Blink. #

Patch Set 19 : Fix presubmit errors (still a deprecation warning for tests). #

Patch Set 20 : Minor. #

Patch Set 21 : Return multiple apps, not just the first. #

Patch Set 22 : Rebase. #

Patch Set 23 : More major refactoring. Getting there. #

Patch Set 24 : Rebase. #

Patch Set 25 : Depend on 2662303003 (IDL file changes). #

Patch Set 26 : Replace old (and trivial) js-test-based LayoutTest with a testharness-based test. #

Patch Set 27 : Added IPC security owners for Mojom files. #

Patch Set 28 : RelatedAppsFetcher is no longer a RenderFrameObserver. #

Patch Set 29 : Clean up temp code: default implementation now returns 0 apps, rather than all. #

Patch Set 30 : Remove vestigial test file. #

Patch Set 31 : Minor. #

Patch Set 32 : Remove all browser side / mojo stuff (split into a separate CL). #

Patch Set 33 : Delete all browser side / mojo stuff. Save for a future CL. #

Patch Set 34 : Remove unused include and IWYU. #

Patch Set 35 : RelatedAppsFetcher takes a raw pointer to a ManifestManager instead of using a routing id. #

Patch Set 36 : Rebase. #

Total comments: 3

Patch Set 37 : Rebase. #

Patch Set 38 : Remove some abstraction in CallbackFilter and rename. #

Patch Set 39 : Rebase. #

Total comments: 9

Patch Set 40 : Preserve null in RelatedApplication fields. #

Patch Set 41 : Minor cleanup. #

Patch Set 42 : Use SecurityOrigin, not WebSecurityOrigin. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -78 lines) Patch
M content/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +2 lines, -0 lines 0 comments Download
A content/renderer/installedapp/related_apps_fetcher.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 24 25 26 27 28 29 30 31 32 33 34 1 chunk +50 lines, -0 lines 0 comments Download
A content/renderer/installedapp/related_apps_fetcher.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +53 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.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 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/installedapp/getinstalledrelatedapps.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/installedapp/getinstalledrelatedapps-empty.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/installedapp/resources/installedapp-test-helper.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/installedapp/resources/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/installedapp/InstalledAppController.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +24 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +75 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/public/platform/modules/installedapp/WebInstalledAppClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -30 lines 0 comments Download
A + third_party/WebKit/public/platform/modules/installedapp/WebRelatedAppsFetcher.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 24 25 26 27 28 29 30 31 32 33 1 chunk +10 lines, -9 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.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 24 25 26 27 28 29 30 31 32 33 34 35 36 3 chunks +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 43 (27 generated)
Matt Giuca
esprehn: Please review changes in content/renderer. haraken: Please review changes in third_party/WebKit. Note: I raised ...
3 years, 10 months ago (2017-02-02 07:21:16 UTC) #12
esprehn
I see routing IDs here which is scary, I thought we didn't use those anymore? ...
3 years, 10 months ago (2017-02-02 07:34:32 UTC) #13
Matt Giuca
On 2017/02/02 07:34:32, esprehn wrote: > I see routing IDs here which is scary, I ...
3 years, 10 months ago (2017-02-02 23:35:42 UTC) #14
haraken
On 2017/02/02 23:35:42, Matt Giuca wrote: > On 2017/02/02 07:34:32, esprehn wrote: > > I ...
3 years, 10 months ago (2017-02-03 08:57:37 UTC) #19
Matt Giuca
So, does this need further review or is it good? (Haraken used "looks good to ...
3 years, 10 months ago (2017-02-06 06:45:52 UTC) #20
haraken
On 2017/02/06 06:45:52, Matt Giuca wrote: > So, does this need further review or is ...
3 years, 10 months ago (2017-02-06 07:44:24 UTC) #21
Matt Giuca
On 2017/02/06 07:44:24, haraken wrote: > On 2017/02/06 06:45:52, Matt Giuca wrote: > > So, ...
3 years, 10 months ago (2017-02-07 23:57:10 UTC) #22
esprehn
https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode46 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:46: void CallbackFilter::onSuccess( lets just make this virtual and call ...
3 years, 10 months ago (2017-02-08 04:40:34 UTC) #27
Matt Giuca
https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode46 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:46: void CallbackFilter::onSuccess( On 2017/02/08 04:40:33, esprehn wrote: > lets ...
3 years, 10 months ago (2017-02-08 08:27:11 UTC) #28
Matt Giuca
https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp File third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp (right): https://codereview.chromium.org/2488573002/diff/740001/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp#newcode46 third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp:46: void CallbackFilter::onSuccess( On 2017/02/08 08:27:11, Matt Giuca wrote: > ...
3 years, 10 months ago (2017-02-13 06:34:50 UTC) #29
esprehn
lgtm, the NullableString -> WebString conversions are very sketchy since you ignore the null bit. ...
3 years, 10 months ago (2017-02-15 01:56:50 UTC) #30
Matt Giuca
https://codereview.chromium.org/2488573002/diff/800001/content/renderer/installedapp/related_apps_fetcher.cc File content/renderer/installedapp/related_apps_fetcher.cc (right): https://codereview.chromium.org/2488573002/diff/800001/content/renderer/installedapp/related_apps_fetcher.cc#newcode41 content/renderer/installedapp/related_apps_fetcher.cc:41: blink::WebString::fromUTF16(relatedApplication.platform.string()); On 2017/02/15 01:56:50, esprehn wrote: > This doesn't ...
3 years, 10 months ago (2017-02-15 07:55:35 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488573002/880001
3 years, 10 months ago (2017-02-15 07:55:54 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_site_isolation on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_site_isolation/builds/6048)
3 years, 10 months ago (2017-02-15 11:01:32 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2488573002/880001
3 years, 10 months ago (2017-02-15 23:05:12 UTC) #39
commit-bot: I haz the power
3 years, 10 months ago (2017-02-16 04:10:29 UTC) #43
Message was sent while issue was closed.
Committed patchset #42 (id:880001) as
https://chromium.googlesource.com/chromium/src/+/be2c7115703a6610b25128809eb3...

Powered by Google App Engine
This is Rietveld 408576698