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

Issue 1411063007: Add mojo::StrongBindingSet and use it in GeolocationServiceContext. (Closed)

Created:
5 years, 1 month ago by Sam McNally
Modified:
4 years, 10 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj, darin (slow to review), darin-cc_chromium.org, devtools-reviews_chromium.org, mlamouri+watch-geolocation_chromium.org, nasko+codewatch_chromium.org, pfeldman, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add mojo::StrongBindingSet and use it in GeolocationServiceContext. Currently, mojo service context classes each manage their service lifetimes. This causes duplicated code for tying service lifetime to the corresponding mojo connection. This change adds mojo::StrongBindingSet to abstract away those details. This also changes GeolocationServiceContext into a WebContentsUserData so it can be decoupled from WebContentsImpl and RenderFrameHostDelegate. BUG=556749

Patch Set 1 #

Total comments: 24

Patch Set 2 : #

Patch Set 3 : #

Total comments: 12

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Total comments: 7

Patch Set 6 : rebase #

Patch Set 7 : #

Total comments: 5

Patch Set 8 : rebase #

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -175 lines) Patch
M content/browser/android/content_view_core_impl.cc View 1 2 3 1 chunk +9 lines, -4 lines 0 comments Download
M content/browser/devtools/protocol/emulation_handler.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h View 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -27 lines 0 comments Download
M content/browser/geolocation/geolocation_service_context.h View 1 2 3 4 5 6 7 8 9 3 chunks +28 lines, -15 lines 0 comments Download
M content/browser/geolocation/geolocation_service_context.cc View 1 2 3 4 5 6 7 3 chunks +36 lines, -15 lines 0 comments Download
M content/browser/geolocation/geolocation_service_impl.h View 1 2 3 4 5 2 chunks +13 lines, -29 lines 0 comments Download
M content/browser/geolocation/geolocation_service_impl.cc View 1 2 3 4 5 6 7 5 chunks +62 lines, -60 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 3 chunks +0 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -6 lines 0 comments Download
M mojo/common/BUILD.gn View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download
A mojo/common/strong_binding_set.h View 1 2 3 4 5 6 7 8 9 1 chunk +156 lines, -0 lines 0 comments Download
A mojo/common/strong_binding_set_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +183 lines, -0 lines 0 comments Download
M mojo/mojo_base.gyp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (16 generated)
Sam McNally
5 years, 1 month ago (2015-11-10 00:19:51 UTC) #2
Anand Mistry (off Chromium)
https://codereview.chromium.org/1411063007/diff/1/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1411063007/diff/1/content/browser/android/content_view_core_impl.cc#newcode371 content/browser/android/content_view_core_impl.cc:371: auto geolocation_service_context = Why the difference? https://codereview.chromium.org/1411063007/diff/1/content/browser/geolocation/geolocation_service_context.cc File content/browser/geolocation/geolocation_service_context.cc ...
5 years, 1 month ago (2015-11-10 04:53:39 UTC) #3
Sam McNally
https://codereview.chromium.org/1411063007/diff/1/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1411063007/diff/1/content/browser/android/content_view_core_impl.cc#newcode371 content/browser/android/content_view_core_impl.cc:371: auto geolocation_service_context = On 2015/11/10 04:53:39, Anand Mistry wrote: ...
5 years, 1 month ago (2015-11-11 07:04:03 UTC) #5
Michael van Ouwerkerk
Thanks Sam. For future patches, please break out changes to Mojo from things like turning ...
5 years, 1 month ago (2015-11-11 11:20:56 UTC) #7
Anand Mistry (off Chromium)
LGTM with a few minor nits. https://codereview.chromium.org/1411063007/diff/70001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1411063007/diff/70001/content/browser/frame_host/render_frame_host_impl.cc#newcode59 content/browser/frame_host/render_frame_host_impl.cc:59: #include "content/public/browser/permission_manager.h" Could ...
5 years, 1 month ago (2015-11-12 07:11:33 UTC) #8
Sam McNally
https://codereview.chromium.org/1411063007/diff/60001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1411063007/diff/60001/content/browser/android/content_view_core_impl.cc#newcode371 content/browser/android/content_view_core_impl.cc:371: auto geolocation_service_context = On 2015/11/11 11:20:55, Michael van Ouwerkerk ...
5 years, 1 month ago (2015-11-13 00:50:00 UTC) #9
Ken Rockot(use gerrit already)
lgtm
5 years, 1 month ago (2015-11-13 03:29:04 UTC) #10
Michael van Ouwerkerk
geolocation lgtm - thanks Sam!
5 years, 1 month ago (2015-11-13 10:26:23 UTC) #11
danakj
Hey, I looked at your use of std::forwarding and it looks right. Thanks for the ...
5 years, 1 month ago (2015-11-17 21:42:17 UTC) #12
Sam McNally
+jam for content/ outside content/browser/geolocation and mojo/ https://codereview.chromium.org/1411063007/diff/90001/mojo/common/service_set.h File mojo/common/service_set.h (right): https://codereview.chromium.org/1411063007/diff/90001/mojo/common/service_set.h#newcode46 mojo/common/service_set.h:46: Impl* CreateService(InterfaceRequest<Interface> ...
5 years, 1 month ago (2015-11-18 03:17:18 UTC) #16
danakj
https://codereview.chromium.org/1411063007/diff/90001/mojo/common/service_set.h File mojo/common/service_set.h (right): https://codereview.chromium.org/1411063007/diff/90001/mojo/common/service_set.h#newcode59 mojo/common/service_set.h:59: void clear() { holders_.clear(); } On 2015/11/18 03:17:18, Sam ...
5 years, 1 month ago (2015-11-18 19:59:12 UTC) #18
danakj
https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h File mojo/common/service_set.h (right): https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h#newcode46 mojo/common/service_set.h:46: Impl* EmplaceService(InterfaceRequest<Interface> request, Args&&... args) { I should point ...
5 years, 1 month ago (2015-11-18 19:59:51 UTC) #19
jam
+yzshen I have a few questions: -why do we need to decouple GeolocationServiceContext from WebContentsImpl? ...
5 years, 1 month ago (2015-11-19 02:45:38 UTC) #21
Sam McNally
On 2015/11/19 02:45:38, jam wrote: > +yzshen > > I have a few questions: > ...
5 years, 1 month ago (2015-11-19 04:53:26 UTC) #22
yzshen1
https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h File mojo/common/service_set.h (right): https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h#newcode34 mojo/common/service_set.h:34: class ServiceSet { With a quick look, this looks ...
5 years, 1 month ago (2015-11-19 17:34:24 UTC) #23
Ken Rockot(use gerrit already)
To me a StrongBindingSet would be a thing that maintains multiple bindings to a single ...
5 years, 1 month ago (2015-11-19 17:43:23 UTC) #24
jam
On 2015/11/19 04:53:26, Sam McNally wrote: > On 2015/11/19 02:45:38, jam wrote: > > +yzshen ...
5 years, 1 month ago (2015-11-19 17:43:57 UTC) #25
yzshen1
On 2015/11/19 17:43:23, Ken Rockot wrote: > To me a StrongBindingSet would be a thing ...
5 years, 1 month ago (2015-11-19 17:46:51 UTC) #26
yzshen1
On 2015/11/19 17:43:57, jam wrote: > On 2015/11/19 04:53:26, Sam McNally wrote: > > On ...
5 years, 1 month ago (2015-11-19 17:48:47 UTC) #27
Ken Rockot(use gerrit already)
On Thu, Nov 19, 2015 at 9:46 AM, <yzshen@chromium.org> wrote: > On 2015/11/19 17:43:23, Ken ...
5 years, 1 month ago (2015-11-19 18:04:49 UTC) #28
blundell
Hi Sam, Can you add BUG=556749? This CL will solve that bug (I got pointed ...
5 years, 1 month ago (2015-11-20 14:08:04 UTC) #30
Sam McNally
On 2015/11/19 17:43:57, jam wrote: > On 2015/11/19 04:53:26, Sam McNally wrote: > > On ...
5 years, 1 month ago (2015-11-23 01:12:53 UTC) #33
blundell
On 2015/11/19 02:45:38, jam wrote: > +yzshen > > I have a few questions: > ...
5 years, 1 month ago (2015-11-23 08:59:18 UTC) #34
yzshen1
https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h File mojo/common/service_set.h (right): https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h#newcode34 mojo/common/service_set.h:34: class ServiceSet { On 2015/11/23 01:12:53, Sam McNally wrote: ...
5 years, 1 month ago (2015-11-23 16:12:10 UTC) #35
jam
On 2015/11/23 01:12:53, Sam McNally wrote: > On 2015/11/19 17:43:57, jam wrote: > > On ...
5 years, 1 month ago (2015-11-24 00:14:52 UTC) #36
Sam McNally
On 2015/11/24 00:14:52, jam wrote: > On 2015/11/23 01:12:53, Sam McNally wrote: > > On ...
5 years ago (2015-12-01 00:12:54 UTC) #39
yzshen1
On 2015/12/01 00:12:54, Sam McNally wrote: > On 2015/11/24 00:14:52, jam wrote: > > On ...
5 years ago (2015-12-01 18:05:23 UTC) #40
Sam McNally
On 2015/12/01 18:05:23, yzshen1 wrote: > https://codereview.chromium.org/1411063007/diff/150001/mojo/common/service_set.h > > File mojo/common/service_set.h (right): > > > ...
5 years ago (2015-12-02 05:30:46 UTC) #41
yzshen1
On 2015/12/02 05:30:46, Sam McNally wrote: > On 2015/12/01 18:05:23, yzshen1 wrote: > > > ...
5 years ago (2015-12-02 06:04:13 UTC) #42
Sam McNally
On 2015/12/02 06:04:13, yzshen1 wrote: > On 2015/12/02 05:30:46, Sam McNally wrote: > > On ...
5 years ago (2015-12-02 23:52:17 UTC) #45
Ben Goodger (Google)
This seems pretty convoluted and moving further away from conventional Mojo bindings. In general, we ...
5 years ago (2015-12-03 05:13:28 UTC) #46
Sam McNally
On 2015/12/03 05:13:28, Ben Goodger (Google) wrote: > This seems pretty convoluted and moving further ...
5 years ago (2015-12-03 06:29:11 UTC) #47
chromium-reviews
On Wed, Dec 2, 2015 at 10:29 PM, <sammc@chromium.org> wrote: > On 2015/12/03 05:13:28, Ben ...
5 years ago (2015-12-03 06:41:19 UTC) #48
Sam McNally
On 2015/12/03 06:41:19, chromium-reviews wrote: > On Wed, Dec 2, 2015 at 10:29 PM, <mailto:sammc@chromium.org> ...
5 years ago (2015-12-04 00:57:21 UTC) #49
jam
On 2015/12/04 00:57:21, Sam McNally wrote: > On 2015/12/03 06:41:19, chromium-reviews wrote: > > On ...
5 years ago (2015-12-04 18:17:50 UTC) #50
Sam McNally
On 2015/12/04 18:17:50, jam wrote: > On 2015/12/04 00:57:21, Sam McNally wrote: > > On ...
5 years ago (2015-12-07 00:42:04 UTC) #51
Sam McNally
On 2015/12/07 00:42:04, Sam McNally wrote: > On 2015/12/04 18:17:50, jam wrote: > > On ...
5 years ago (2015-12-08 02:17:48 UTC) #52
Sam McNally
ProxyResolverRequestClient: https://codereview.chromium.org/1516493003/ PermissionService: https://codereview.chromium.org/1513973002/ BackgroundSyncService: https://codereview.chromium.org/1507233003/ How many times does this pattern need to occur ...
5 years ago (2015-12-15 06:01:58 UTC) #53
Michael van Ouwerkerk
On 2015/12/15 06:01:58, Sam McNally wrote: > ProxyResolverRequestClient: https://codereview.chromium.org/1516493003/ > PermissionService: https://codereview.chromium.org/1513973002/ > BackgroundSyncService: https://codereview.chromium.org/1507233003/ ...
4 years, 10 months ago (2016-02-12 16:40:51 UTC) #55
blundell
On 2016/02/12 16:40:51, Michael van Ouwerkerk wrote: > On 2015/12/15 06:01:58, Sam McNally wrote: > ...
4 years, 10 months ago (2016-02-15 08:41:01 UTC) #56
Sam McNally
4 years, 10 months ago (2016-02-18 07:13:40 UTC) #57
On 2016/02/15 08:41:01, blundell wrote:
> On 2016/02/12 16:40:51, Michael van Ouwerkerk wrote:
> > On 2015/12/15 06:01:58, Sam McNally wrote:
> > > ProxyResolverRequestClient: https://codereview.chromium.org/1516493003/
> > > PermissionService: https://codereview.chromium.org/1513973002/
> > > BackgroundSyncService: https://codereview.chromium.org/1507233003/
> > > 
> > > How many times does this pattern need to occur before StrongBindingSet can
> be
> > > considered?
> > 
> > Was this patch meant to fix crbug.com/556749 ?
> 
> Yes. There's also a straightforward fix here, which I abandoned when informed
of
> this CL:
> 
> https://codereview.chromium.org/1459343003/

This CL isn't likely to land any time soon. You should probably land yours.

Powered by Google App Engine
This is Rietveld 408576698