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

Issue 841133002: Stop using [Client=...] feature of Mojom for GeolocationService (Closed)

Created:
5 years, 11 months ago by darin (slow to review)
Modified:
5 years, 11 months ago
Reviewers:
Tom Sepez, blundell
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, mlamouri+watch-geolocation_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, Michael van Ouwerkerk, mkwst+moarreviews-renderer_chromium.org, ben+mojo_chromium.org, mlamouri (slow - plz ping)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop using [Client=...] feature of Mojom for GeolocationService Change GeolocationService to instead have a QueryNextPosition() method that clients can use to poll for changes to location. The first call will complete immediately, reporting the current location. After that, QueryNextPosition() will "hang" until there is a change to report. This also solves a defect (anti-pattern) with the older design, which could result in the service consuming a lot of memory. That could happen if the client failed to consume any of the OnLocationUpdate messages. Eventually, the pipe would back up, and queuing of MojoWriteMessage calls would occur in the service's process. By switching to a polling design, this problem is eliminated. See further description of the anti-pattern here: https://groups.google.com/a/chromium.org/forum/#!topic/mojo-dev/pSNDDN3gpFo Committed: https://crrev.com/317e773e3499fe6a19871b5498a5c6164d972316 Cr-Commit-Position: refs/heads/master@{#311217}

Patch Set 1 #

Total comments: 4

Patch Set 2 : revisions per review feedback #

Patch Set 3 : improve comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -33 lines) Patch
M content/browser/geolocation/geolocation_service_impl.h View 1 3 chunks +18 lines, -2 lines 0 comments Download
M content/browser/geolocation/geolocation_service_impl.cc View 3 chunks +35 lines, -15 lines 0 comments Download
M content/common/geolocation_service.mojom View 1 2 1 chunk +8 lines, -7 lines 0 comments Download
M content/renderer/geolocation_dispatcher.h View 2 chunks +3 lines, -4 lines 0 comments Download
M content/renderer/geolocation_dispatcher.cc View 3 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
Tom Sepez
Messages LGTM
5 years, 11 months ago (2015-01-08 22:11:57 UTC) #2
darin (slow to review)
5 years, 11 months ago (2015-01-09 00:43:08 UTC) #3
blundell
https://codereview.chromium.org/841133002/diff/1/content/browser/geolocation/geolocation_service_impl.h File content/browser/geolocation/geolocation_service_impl.h (right): https://codereview.chromium.org/841133002/diff/1/content/browser/geolocation/geolocation_service_impl.h#newcode54 content/browser/geolocation/geolocation_service_impl.h:54: base::Closure update_callback_; I should have documented this variable. Could ...
5 years, 11 months ago (2015-01-09 07:37:26 UTC) #4
blundell
Mounir: FYI, as you were asking about removal of Client interfaces. Note especially the avoidance ...
5 years, 11 months ago (2015-01-09 07:41:53 UTC) #5
darin (slow to review)
On 2015/01/09 07:37:26, blundell wrote: > https://codereview.chromium.org/841133002/diff/1/content/browser/geolocation/geolocation_service_impl.h > File content/browser/geolocation/geolocation_service_impl.h (right): > > https://codereview.chromium.org/841133002/diff/1/content/browser/geolocation/geolocation_service_impl.h#newcode54 > ...
5 years, 11 months ago (2015-01-09 18:00:44 UTC) #6
darin (slow to review)
I'm not that bothered by "update_callback". In the context of the class' public API, it ...
5 years, 11 months ago (2015-01-09 20:09:43 UTC) #7
blundell
LGTM
5 years, 11 months ago (2015-01-12 18:35:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/841133002/40001
5 years, 11 months ago (2015-01-13 04:51:08 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-13 04:56:46 UTC) #11
commit-bot: I haz the power
5 years, 11 months ago (2015-01-13 04:58:20 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/317e773e3499fe6a19871b5498a5c6164d972316
Cr-Commit-Position: refs/heads/master@{#311217}

Powered by Google App Engine
This is Rietveld 408576698