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

Issue 2098923002: Remove dependency of ResourceDispatcherHostImpl on RenderViewHostImpl (Closed)

Created:
4 years, 6 months ago by scottmg
Modified:
4 years, 5 months ago
Reviewers:
jam, Charlie Harrison
CC:
chromium-reviews, creis+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, nasko+codewatch_chromium.org, Randy Smith (Not in Mondays), yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, loading-reviews_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove dependency of ResourceDispatcherHostImpl on RenderViewHostImpl Create an async interface LoaderDelegate to delegate from c/b/loader to the rest of content. This allows decoupling of loader so that it can eventually be moved to a separate service. Start by using it to remove the dependency on RenderViewHostImpl. R=jam BUG=622050 Committed: https://crrev.com/5cbd1cf54e80149c704295563e9466712f86db56 Cr-Commit-Position: refs/heads/master@{#402680}

Patch Set 1 #

Patch Set 2 : erase #

Patch Set 3 : tests #

Patch Set 4 : include #

Patch Set 5 : less thread hopping #

Patch Set 6 : no mojo #

Patch Set 7 : . #

Total comments: 8

Patch Set 8 : fixes #

Patch Set 9 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -33 lines) Patch
M content/browser/browser_main_loop.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/loader/DEPS View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
A content/browser/loader/loader_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 3 4 5 6 4 chunks +5 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 6 chunks +15 lines, -28 lines 0 comments Download
A content/browser/loader_delegate_impl.h View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
A content/browser/loader_delegate_impl.cc View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (6 generated)
scottmg
4 years, 6 months ago (2016-06-24 22:42:11 UTC) #2
mmenke
Drive by comments: * This seems like a really weird mojo interface. Is there any ...
4 years, 6 months ago (2016-06-24 23:08:47 UTC) #3
scottmg
On 2016/06/24 23:08:47, mmenke wrote: > Drive by comments: Thanks for looking! I have no ...
4 years, 6 months ago (2016-06-24 23:33:47 UTC) #4
jam
Do we really care about adding a mojo interface between code in the browser at ...
4 years, 5 months ago (2016-06-27 16:38:43 UTC) #5
scottmg
On 2016/06/27 16:38:43, jam wrote: > Do we really care about adding a mojo interface ...
4 years, 5 months ago (2016-06-27 22:30:41 UTC) #6
scottmg
On 2016/06/27 16:38:43, jam wrote: > Do we really care about adding a mojo interface ...
4 years, 5 months ago (2016-06-27 22:30:43 UTC) #7
Charlie Harrison
drive-by: Just noticed this and it seems like we're stepping on each other's feet here. ...
4 years, 5 months ago (2016-06-27 23:08:52 UTC) #9
Ben Goodger (Google)
On 2016/06/24 22:42:11, scottmg wrote: P.S. I love that you're working on this. This stuff ...
4 years, 5 months ago (2016-06-27 23:14:43 UTC) #10
scottmg
On 2016/06/27 23:08:52, csharrison wrote: > drive-by: Just noticed this and it seems like we're ...
4 years, 5 months ago (2016-06-27 23:25:13 UTC) #11
jam
lgtm https://codereview.chromium.org/2098923002/diff/120001/content/browser/loader/loader_delegate.h File content/browser/loader/loader_delegate.h (right): https://codereview.chromium.org/2098923002/diff/120001/content/browser/loader/loader_delegate.h#newcode10 content/browser/loader/loader_delegate.h:10: #include "content/browser/loader/global_routing_id.h" nit: how about just sending child_id ...
4 years, 5 months ago (2016-06-28 16:23:49 UTC) #12
scottmg
Thanks! mmenke, do you want to take another look? https://codereview.chromium.org/2098923002/diff/120001/content/browser/loader/loader_delegate.h File content/browser/loader/loader_delegate.h (right): https://codereview.chromium.org/2098923002/diff/120001/content/browser/loader/loader_delegate.h#newcode10 content/browser/loader/loader_delegate.h:10: ...
4 years, 5 months ago (2016-06-28 18:33:39 UTC) #14
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/2098923002/160001
4 years, 5 months ago (2016-06-28 21:56:06 UTC) #17
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 5 months ago (2016-06-29 02:35:10 UTC) #18
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/5cbd1cf54e80149c704295563e9466712f86db56 Cr-Commit-Position: refs/heads/master@{#402680}
4 years, 5 months ago (2016-06-29 02:36:29 UTC) #20
mmenke
On 2016/06/28 18:33:39, scottmg wrote: > Thanks! mmenke, do you want to take another look? ...
4 years, 5 months ago (2016-06-29 15:22:32 UTC) #21
mmenke
4 years, 5 months ago (2016-06-29 15:24:19 UTC) #22
Message was sent while issue was closed.
On 2016/06/24 23:33:47, scottmg wrote:
> On 2016/06/24 23:08:47, mmenke wrote:
> > Drive by comments:
> 
> Thanks for looking! I have no idea what I'm doing. :)
> 
> > 
> > * This seems like a really weird mojo interface.  Is there any reason RDH
> needs
> > to know it's the RVH that wants theese updates?  Also note that we're
working
> > towards getting rid of The ResourceScheduler, so even if the
> > "scheduler_->OnClientCreated" call still seems weird, that will (hopefully)
go
> > away at some point.
> 
> I'm not sure what you mean by RDH needing to know. You mean the hookup could
be
> less explicit? Or that the interface would be better named something like
> ResourceDispatchHostNotifier or something like that? It'd be nice if
> WebContentsImpl could be the one to get notified directly rather than through
> layers of delegates, but I wasn't sure how to set that up, so this was my
> attempt at making some progress in that direction.

What I meant was the naming of those methods - which it looks like you
addressed.

> > * If we're using a mojo interface for this, is there any reason
> > ResourceDispatcherHostImpl::UpdateLoadInfoOnUIThread has to be called on the
> UI
> > thread?  I assume mojo has no magic to make same-thread calls more efficient
> > that a cross-thread call, or does it?
> 
> Good point, I think probably not. I'll look into that.
> 
> > * Are there performance considerations for this kind of thing?  My
> understanding
> > it mojo always serializes/deserializes all of its arguments.
> 
> Maybe I underestimated how often this happens, it seemed fairly infrequent
based
> on my limited testing (per URL, every 250ms). But yes, I would assume it's
> slightly more expensive when mojo is talking in-process to serialize the 4
ints
> + string per LoadStateChanged(), than it will be to call a delegate function.
> 
> > * Are there any tests for this?  If not, it's a pre-existing issue, just
> wonder
> > if we have protection if this, say, breaks updating the displayed page load
> > status.
> 
> I was hoping I might break something along the way, but I don't see any. I'll
> see if I can add something to web_contents_impl_(unit|browser)test.cc.

Powered by Google App Engine
This is Rietveld 408576698