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

Issue 2043753002: Declarative resource hints go through mojo IPC to //content

Created:
4 years, 6 months ago by Charlie Harrison
Modified:
3 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, gavinp+prerender_chromium.org, gavinp+loader_chromium.org, jam, Nate Chapin, kinuko+watch, loading-reviews_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, tyoshino+watch_chromium.org, viettrungluu+watch_chromium.org, Yoav Weiss, yzshen+watch_chromium.org, horo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Declarative resource hints go through mojo IPC to //content This patch adds a mojo IPC route for preconnects / preresolves that are declared by site authors (i.e. not speculative). Speculative hints (anchor tag scanning, mouse hovering) still go through traditional IPC, and will be ported to this sytem (using a delegate system) in a follow up patch. BUG=610750, 565719

Patch Set 1 #

Patch Set 2 : remove platform dependency from KURL.typemap #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : mek@ review #

Patch Set 5 #

Total comments: 19

Patch Set 6 : kinuko@ + yzshen@ reviews, also big refactor for mojo in Platform #

Patch Set 7 : Move PlatformMojoMock into platform/testing #

Patch Set 8 : Use unique_ptr to avoid memory leaks in unit tests #

Total comments: 27

Patch Set 9 : Don't kill NetworkHints yet #

Patch Set 10 : Update comment and get rid of the platform mock #

Total comments: 8

Patch Set 11 : kinuko@ review: comments and remove PlatformMojoMock.h from gypi #

Total comments: 2

Patch Set 12 : remove gmocking + add another browser test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -65 lines) Patch
M chrome/browser/net/predictor_browsertest.cc View 3 chunks +3 lines, -25 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 2 chunks +0 lines, -17 lines 0 comments Download
D chrome/test/data/predictor/dns_prefetch.html View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/loader/resource_hints_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +89 lines, -0 lines 0 comments Download
A content/browser/loader/resource_hints_handler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +50 lines, -0 lines 0 comments Download
A content/browser/loader/resource_hints_handler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +56 lines, -0 lines 0 comments Download
M content/browser/loader/resource_hints_impl.cc View 3 chunks +13 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A + content/test/data/resource_hints/dns_prefetch.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A content/test/data/resource_hints/dns_prefetch_many.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoader.cpp View 1 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NetworkHintsInterface.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/PlatformMojoServices.h View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/PlatformMojoServices.cpp View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/platform/blink_platform.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/Platform.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/KURL.typemap View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/SecurityOrigin.typemap View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkHints.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkHints.cpp View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -5 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink.gyp View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -1 line 0 comments Download
A third_party/WebKit/public/platform/resource_hints.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 70 (10 generated)
Charlie Harrison
yzshen@, do you mind taking a look at this? I've refactored a bit since we ...
4 years, 6 months ago (2016-06-06 14:45:12 UTC) #2
Charlie Harrison
yzshen@, do you mind taking a look at this? I've refactored a bit since we ...
4 years, 6 months ago (2016-06-06 14:45:29 UTC) #4
Charlie Harrison
On 2016/06/06 14:45:29, csharrison wrote: > yzshen@, do you mind taking a look at this? ...
4 years, 6 months ago (2016-06-06 14:50:49 UTC) #5
Charlie Harrison
+kinuko@ for a general review as well.
4 years, 6 months ago (2016-06-06 16:19:19 UTC) #7
yzshen1
On 2016/06/06 14:45:12, csharrison wrote: > yzshen@, do you mind taking a look at this? ...
4 years, 6 months ago (2016-06-06 21:12:07 UTC) #8
Charlie Harrison
On 2016/06/06 21:12:07, yzshen1 wrote: > On 2016/06/06 14:45:12, csharrison wrote: > > yzshen@, do ...
4 years, 6 months ago (2016-06-06 21:30:53 UTC) #9
Marijn Kruisselbrink
On 2016/06/06 at 21:30:53, csharrison wrote: > On 2016/06/06 21:12:07, yzshen1 wrote: > > On ...
4 years, 6 months ago (2016-06-06 21:36:34 UTC) #10
Charlie Harrison
On 2016/06/06 21:36:34, Marijn Kruisselbrink wrote: > On 2016/06/06 at 21:30:53, csharrison wrote: > > ...
4 years, 6 months ago (2016-06-06 21:50:12 UTC) #11
yzshen1
On 2016/06/06 21:36:34, Marijn Kruisselbrink wrote: > On 2016/06/06 at 21:30:53, csharrison wrote: > > ...
4 years, 6 months ago (2016-06-06 22:12:37 UTC) #12
Charlie Harrison
On 2016/06/06 22:12:37, yzshen1 wrote: > On 2016/06/06 21:36:34, Marijn Kruisselbrink wrote: > > On ...
4 years, 6 months ago (2016-06-07 20:15:49 UTC) #13
Marijn Kruisselbrink
https://codereview.chromium.org/2043753002/diff/40001/third_party/WebKit/Source/platform/BUILD.gn File third_party/WebKit/Source/platform/BUILD.gn (right): https://codereview.chromium.org/2043753002/diff/40001/third_party/WebKit/Source/platform/BUILD.gn#newcode368 third_party/WebKit/Source/platform/BUILD.gn:368: "//third_party/WebKit/public:mojo_bindings", Why are you depending on the non-blink mojo ...
4 years, 6 months ago (2016-06-07 20:22:25 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2043753002/80001
4 years, 6 months ago (2016-06-08 04:43:00 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/212856)
4 years, 6 months ago (2016-06-08 05:26:15 UTC) #19
Charlie Harrison
Thanks a lot mek@ for the help. Looks like everything is good now except chromeos ...
4 years, 6 months ago (2016-06-08 12:28:20 UTC) #20
yzshen1
https://codereview.chromium.org/2043753002/diff/80001/content/browser/loader/resource_hints_controller.cc File content/browser/loader/resource_hints_controller.cc (right): https://codereview.chromium.org/2043753002/diff/80001/content/browser/loader/resource_hints_controller.cc#newcode25 content/browser/loader/resource_hints_controller.cc:25: mojo::InterfaceRequest<blink::mojom::ResourceHintsDispatcherHost> request) { nit: in case you don't know, ...
4 years, 6 months ago (2016-06-08 17:40:54 UTC) #21
kinuko
https://codereview.chromium.org/2043753002/diff/80001/content/browser/loader/resource_hints_controller.cc File content/browser/loader/resource_hints_controller.cc (right): https://codereview.chromium.org/2043753002/diff/80001/content/browser/loader/resource_hints_controller.cc#newcode54 content/browser/loader/resource_hints_controller.cc:54: delete this; On 2016/06/08 17:40:53, yzshen1 wrote: > Please ...
4 years, 6 months ago (2016-06-09 07:09:19 UTC) #22
Charlie Harrison
Thanks for the reviews. Refactored the code so that all the calls go through Platform ...
4 years, 6 months ago (2016-06-10 14:20:00 UTC) #23
yzshen1
LGTM (for the way of using Mojo stuff; I don't know much about the resource ...
4 years, 6 months ago (2016-06-10 15:45:43 UTC) #24
Yoav Weiss
I'm probably not fully understanding the new tests, but at first glance it seems like ...
4 years, 6 months ago (2016-06-13 08:26:08 UTC) #26
Charlie Harrison
https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp File third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp (right): https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp#newcode54 third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp:54: preloader->preload(std::move(preloadRequest)); On 2016/06/13 at 08:26:08, Yoav Weiss wrote: > ...
4 years, 6 months ago (2016-06-14 19:28:45 UTC) #27
kinuko
https://codereview.chromium.org/2043753002/diff/140001/content/browser/loader/resource_hints_controller.h File content/browser/loader/resource_hints_controller.h (right): https://codereview.chromium.org/2043753002/diff/140001/content/browser/loader/resource_hints_controller.h#newcode20 content/browser/loader/resource_hints_controller.h:20: class ResourceHintsController : public blink::mojom::ResourceHintsHandler { nit: the most ...
4 years, 6 months ago (2016-06-16 05:39:59 UTC) #28
Charlie Harrison
Haven't uploaded the new PS until we come to agreement about NetworkHints.h / NetworkHintsInterface. If ...
4 years, 6 months ago (2016-06-16 11:00:20 UTC) #29
kinuko
https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/platform/network/NetworkHints.h File third_party/WebKit/Source/platform/network/NetworkHints.h (left): https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/platform/network/NetworkHints.h#oldcode38 third_party/WebKit/Source/platform/network/NetworkHints.h:38: PLATFORM_EXPORT void preconnect(const KURL&, const CrossOriginAttributeValue); On 2016/06/16 11:00:19, ...
4 years, 6 months ago (2016-06-16 13:04:50 UTC) #30
Charlie Harrison
https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/platform/network/NetworkHints.h File third_party/WebKit/Source/platform/network/NetworkHints.h (left): https://codereview.chromium.org/2043753002/diff/140001/third_party/WebKit/Source/platform/network/NetworkHints.h#oldcode38 third_party/WebKit/Source/platform/network/NetworkHints.h:38: PLATFORM_EXPORT void preconnect(const KURL&, const CrossOriginAttributeValue); On 2016/06/16 at ...
4 years, 6 months ago (2016-06-16 14:41:20 UTC) #31
Charlie Harrison
Ok. I did my best to revert back to using all the NetworkHints infrastructure to ...
4 years, 6 months ago (2016-06-16 21:31:22 UTC) #32
kinuko
lgtm As you write we could probably cleanup the interfaces / glue code further, but ...
4 years, 6 months ago (2016-06-17 04:30:25 UTC) #33
Charlie Harrison
mmenke@, feel free to punt this if you're busy. The ResourceContext won't outlive the IO ...
4 years, 6 months ago (2016-06-17 06:43:11 UTC) #35
mmenke
https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc File content/browser/loader/resource_hints_browsertest.cc (right): https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc#newcode50 content/browser/loader/resource_hints_browsertest.cc:50: EXPECT_CALL(*mock_host_resolver_proc_, Resolve("chromium.org", _, _, _, _)) I'd recommend against ...
4 years, 6 months ago (2016-06-17 20:05:36 UTC) #36
Charlie Harrison
https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc File content/browser/loader/resource_hints_browsertest.cc (right): https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc#newcode50 content/browser/loader/resource_hints_browsertest.cc:50: EXPECT_CALL(*mock_host_resolver_proc_, Resolve("chromium.org", _, _, _, _)) On 2016/06/17 20:05:36, ...
4 years, 6 months ago (2016-06-19 11:01:57 UTC) #37
kinuko
On 2016/06/19 11:01:57, csharrison wrote: > https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc > File content/browser/loader/resource_hints_browsertest.cc (right): > > https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc#newcode50 > ...
4 years, 6 months ago (2016-06-20 00:04:42 UTC) #38
Charlie Harrison
On 2016/06/20 00:04:42, kinuko wrote: > On 2016/06/19 11:01:57, csharrison wrote: > > > https://codereview.chromium.org/2043753002/diff/200001/content/browser/loader/resource_hints_browsertest.cc ...
4 years, 6 months ago (2016-06-20 01:35:44 UTC) #39
Charlie Harrison
Ok I removed the Gmock stuff in favor of a vector / helper methods. Thanks ...
4 years, 6 months ago (2016-06-20 17:27:34 UTC) #40
Charlie Harrison
+jochen@ for chrome_render_message_filter.cc. Feel free to look at other stuff if you want too :)
4 years, 6 months ago (2016-06-21 23:45:45 UTC) #42
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-22 13:21:44 UTC) #43
mmenke
No need to wait for me to weigh in on this one, just to be ...
4 years, 6 months ago (2016-06-22 15:52:43 UTC) #44
Charlie Harrison
I chatted with mmenke@ offline about the lifetime issues I brought up earlier. Unfortunately, MessageLoop ...
4 years, 6 months ago (2016-06-22 18:11:47 UTC) #45
mmenke
On 2016/06/22 18:11:47, csharrison wrote: > I chatted with mmenke@ offline about the lifetime issues ...
4 years, 6 months ago (2016-06-22 18:39:01 UTC) #46
Charlie Harrison
On 2016/06/22 18:39:01, mmenke wrote: > On 2016/06/22 18:11:47, csharrison wrote: > > I chatted ...
4 years, 6 months ago (2016-06-22 19:12:44 UTC) #47
kinuko
one more nit.. https://codereview.chromium.org/2043753002/diff/220001/third_party/WebKit/Source/platform/PlatformMojoServices.cpp File third_party/WebKit/Source/platform/PlatformMojoServices.cpp (right): https://codereview.chromium.org/2043753002/diff/220001/third_party/WebKit/Source/platform/PlatformMojoServices.cpp#newcode17 third_party/WebKit/Source/platform/PlatformMojoServices.cpp:17: { Platform methods are exposed to ...
4 years, 6 months ago (2016-06-23 15:38:07 UTC) #48
yzshen1
On 2016/06/22 18:39:01, mmenke wrote: > On 2016/06/22 18:11:47, csharrison wrote: > > I chatted ...
4 years, 6 months ago (2016-06-23 16:19:38 UTC) #49
mmenke
On 2016/06/23 16:19:38, yzshen1 wrote: > On 2016/06/22 18:39:01, mmenke wrote: > > On 2016/06/22 ...
4 years, 6 months ago (2016-06-23 16:30:15 UTC) #50
Charlie Harrison
On 2016/06/23 16:19:38, yzshen1 wrote: > On 2016/06/22 18:39:01, mmenke wrote: > > On 2016/06/22 ...
4 years, 6 months ago (2016-06-23 16:32:55 UTC) #51
yzshen1
On Thu, Jun 23, 2016 at 9:30 AM, <mmenke@chromium.org> wrote: > On 2016/06/23 16:19:38, yzshen1 ...
4 years, 6 months ago (2016-06-23 18:14:37 UTC) #52
yzshen1
On Thu, Jun 23, 2016 at 9:30 AM, <mmenke@chromium.org> wrote: > On 2016/06/23 16:19:38, yzshen1 ...
4 years, 6 months ago (2016-06-23 18:14:37 UTC) #53
kinuko
On 2016/06/23 16:32:55, csharrison wrote: > On 2016/06/23 16:19:38, yzshen1 wrote: > > On 2016/06/22 ...
4 years, 6 months ago (2016-06-24 05:36:24 UTC) #54
Charlie Harrison
On 2016/06/24 05:36:24, kinuko wrote: > On 2016/06/23 16:32:55, csharrison wrote: > > On 2016/06/23 ...
4 years, 5 months ago (2016-06-24 12:31:01 UTC) #55
mmenke
On 2016/06/24 12:31:01, csharrison wrote: > On 2016/06/24 05:36:24, kinuko wrote: > > On 2016/06/23 ...
4 years, 5 months ago (2016-06-24 12:36:40 UTC) #56
mmenke
On 2016/06/24 12:36:40, mmenke wrote: > On 2016/06/24 12:31:01, csharrison wrote: > > On 2016/06/24 ...
4 years, 5 months ago (2016-06-24 12:37:12 UTC) #57
mmenke
On 2016/06/24 12:37:12, mmenke wrote: > On 2016/06/24 12:36:40, mmenke wrote: > > On 2016/06/24 ...
4 years, 5 months ago (2016-06-24 12:38:20 UTC) #58
Charlie Harrison
Yes, mmenke@ is right. For incognito mode we have to rely on the connection to ...
4 years, 5 months ago (2016-06-24 13:20:16 UTC) #59
mmenke
On 2016/06/24 13:20:16, csharrison wrote: > Yes, mmenke@ is right. For incognito mode we have ...
4 years, 5 months ago (2016-06-24 14:18:15 UTC) #60
kinuko
On 2016/06/24 14:18:15, mmenke wrote: > On 2016/06/24 13:20:16, csharrison wrote: > > Yes, mmenke@ ...
4 years, 5 months ago (2016-06-27 04:29:40 UTC) #61
Charlie Harrison
On 2016/06/27 at 04:29:40, kinuko wrote: > On 2016/06/24 14:18:15, mmenke wrote: > > On ...
4 years, 5 months ago (2016-06-27 13:11:52 UTC) #62
yzshen1
On 2016/06/27 13:11:52, csharrison wrote: > On 2016/06/27 at 04:29:40, kinuko wrote: > > On ...
4 years, 5 months ago (2016-06-28 20:40:27 UTC) #63
mmenke
On 2016/06/28 20:40:27, yzshen1 wrote: > On 2016/06/27 13:11:52, csharrison wrote: > > On 2016/06/27 ...
4 years, 5 months ago (2016-06-28 20:46:14 UTC) #64
Charlie Harrison
On 2016/06/28 at 20:40:27, yzshen wrote: > On 2016/06/27 13:11:52, csharrison wrote: > > On ...
4 years, 5 months ago (2016-06-28 20:47:30 UTC) #65
yzshen1
On 2016/06/28 20:47:30, csharrison wrote: > On 2016/06/28 at 20:40:27, yzshen wrote: > > On ...
4 years, 5 months ago (2016-06-30 16:22:56 UTC) #66
kinuko
On 2016/06/30 16:22:56, yzshen1 wrote: > On 2016/06/28 20:47:30, csharrison wrote: > > On 2016/06/28 ...
4 years, 5 months ago (2016-07-01 01:50:08 UTC) #67
Charlie Harrison
Thanks, everyone for being patient and helping out with this :)
4 years, 5 months ago (2016-07-01 12:06:28 UTC) #68
mmenke
3 years, 6 months ago (2017-06-12 15:11:01 UTC) #69
On 2016/07/01 12:06:28, Charlie Harrison wrote:
> Thanks, everyone for being patient and helping out with this :)

Removing myself from this CL.  Feel free to add me back if you pick it up again.

Powered by Google App Engine
This is Rietveld 408576698