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

Issue 840553003: Use a FrameAssociatedLoader when downloading image resources. (Closed)

Created:
5 years, 11 months ago by mlamouri (slow - plz ping)
Modified:
5 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, fbeaufortchromium, jam, jsbell, kinuko+watch, Kunihiko Sakamoto, mkwst+moarreviews-renderer_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use a FrameAssociatedLoader when downloading image resources. It makes MultiResolutionImageResourceFetcher uses FRAME_ASSOCIATED_LOADER instead of PLATFORM_LOADER and set the loader options to allow cross origin fetching and passes credentials. Amongst other things, using the Blink loader will show the load in the developer tools. For example, it does expose a bug while trying to fetch the favicon in https://www.gmail.com/intl/en/mail/help/about.html The load allows cross origin because many websites uses CDN for favicon and it allows credentials because the last attempt to not pass cookies to the favicon request failed, see bug 114082. This CL is not changing any credential/cross-origin behaviour but makes it explicit. Furthermore, this CL changes some special favicon requests handling in resource_dispatcher_host_impl.cc and instead explicitly bypass service workers when setting up the request. BUG=110449 Committed: https://crrev.com/f484b43ae8679aadeac8cc593b5cb7d5cd9a55c8 Cr-Commit-Position: refs/heads/master@{#311519}

Patch Set 1 #

Total comments: 3

Patch Set 2 : bypass sw for favicons #

Total comments: 8

Patch Set 3 : review comments #

Patch Set 4 : add favicons for some tests #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -27 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M content/public/renderer/resource_fetcher.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc View 1 2 chunks +16 lines, -1 line 0 comments Download
M content/renderer/fetchers/resource_fetcher_impl.h View 1 2 3 chunks +6 lines, -1 line 0 comments Download
M content/renderer/fetchers/resource_fetcher_impl.cc View 1 2 6 chunks +29 lines, -21 lines 0 comments Download
A tools/telemetry/unittest_data/favicon.ico View 1 2 3 Binary file 0 comments Download

Messages

Total messages: 47 (13 generated)
mlamouri (slow - plz ping)
avi@, can you take a look? Sorry for asking you to review something deep into ...
5 years, 11 months ago (2015-01-06 17:17:24 UTC) #2
Avi (use Gerrit)
I don't know enough about the loader code to comment intelligently. Try japhet@ or nasko@.
5 years, 11 months ago (2015-01-06 17:20:01 UTC) #3
mlamouri (slow - plz ping)
-avi@, +nasko@
5 years, 11 months ago (2015-01-06 17:26:05 UTC) #5
mlamouri (slow - plz ping)
https://codereview.chromium.org/840553003/diff/1/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc File content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc (right): https://codereview.chromium.org/840553003/diff/1/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc#newcode46 content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc:46: ResourceFetcher::FRAME_ASSOCIATED_LOADER, If exposing all image loading in the devtools ...
5 years, 11 months ago (2015-01-06 17:32:50 UTC) #6
nasko
Nate is much more versed in loading than I am.
5 years, 11 months ago (2015-01-06 18:08:29 UTC) #8
Nate Chapin
This seems reasonable in general, though I'm not sure about the cookie behavior change. Also, ...
5 years, 11 months ago (2015-01-06 18:18:42 UTC) #9
mlamouri (slow - plz ping)
https://codereview.chromium.org/840553003/diff/1/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc File content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc (right): https://codereview.chromium.org/840553003/diff/1/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc#newcode37 content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc:37: options.allowCredentials = true; On 2015/01/06 18:18:42, Nate Chapin wrote: ...
5 years, 11 months ago (2015-01-07 10:08:06 UTC) #10
Nate Chapin
Ok, thanks for clarifying. LGTM
5 years, 11 months ago (2015-01-07 18:56:45 UTC) #11
nasko
Rubberstamp LGTM
5 years, 11 months ago (2015-01-07 19:02:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/840553003/1
5 years, 11 months ago (2015-01-07 20:19:41 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/12462)
5 years, 11 months ago (2015-01-07 21:39:02 UTC) #16
mlamouri (slow - plz ping)
tyoshino@, it seems that this CL raises one ASSERT that you added in https://chromium.googlesource.com/chromium/blink/+/430b65c4e33c08d34f67e212eb8e9bbaf6495dd9 Do ...
5 years, 11 months ago (2015-01-08 14:32:46 UTC) #18
tyoshino (SeeGerritForStatus)
On 2015/01/08 14:32:46, Mounir Lamouri wrote: > tyoshino@, it seems that this CL raises one ...
5 years, 11 months ago (2015-01-09 04:41:26 UTC) #19
tyoshino (SeeGerritForStatus)
On 2015/01/09 04:41:26, tyoshino wrote: > Do you know which ASSERT is hit? OK. I ...
5 years, 11 months ago (2015-01-09 07:38:43 UTC) #20
tyoshino (SeeGerritForStatus)
On 2015/01/09 07:38:43, tyoshino wrote: > On 2015/01/09 04:41:26, tyoshino wrote: > > Do you ...
5 years, 11 months ago (2015-01-09 08:41:50 UTC) #21
tyoshino (SeeGerritForStatus)
On 2015/01/09 08:41:50, tyoshino wrote: > On 2015/01/09 07:38:43, tyoshino wrote: > > On 2015/01/09 ...
5 years, 11 months ago (2015-01-09 09:59:54 UTC) #22
horo
I think we should not remove this ASSERT(!m_fallbackRequestForServiceWorker) in DocumentThreadableLoader. To avoid the favicon cache ...
5 years, 11 months ago (2015-01-13 03:53:46 UTC) #24
mlamouri (slow - plz ping)
On 2015/01/13 at 03:53:46, horo wrote: > I think we should not remove this ASSERT(!m_fallbackRequestForServiceWorker) ...
5 years, 11 months ago (2015-01-13 13:49:40 UTC) #25
tyoshino (SeeGerritForStatus)
On 2015/01/13 13:49:40, Mounir Lamouri wrote: > On 2015/01/13 at 03:53:46, horo wrote: > > ...
5 years, 11 months ago (2015-01-13 14:47:58 UTC) #26
mlamouri (slow - plz ping)
On 2015/01/13 at 14:47:58, tyoshino wrote: > On 2015/01/13 13:49:40, Mounir Lamouri wrote: > > ...
5 years, 11 months ago (2015-01-13 14:52:59 UTC) #27
tyoshino (SeeGerritForStatus)
On 2015/01/13 14:52:59, Mounir Lamouri wrote: > On 2015/01/13 at 14:47:58, tyoshino wrote: > > ...
5 years, 11 months ago (2015-01-13 17:09:06 UTC) #28
mlamouri (slow - plz ping)
I've updated the CL to have the special favicon SW happening in the fetcher instead ...
5 years, 11 months ago (2015-01-13 18:06:50 UTC) #29
horo
lgtm Thank you!
5 years, 11 months ago (2015-01-14 03:39:51 UTC) #30
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/840553003/diff/20001/content/renderer/fetchers/resource_fetcher_impl.cc File content/renderer/fetchers/resource_fetcher_impl.cc (right): https://codereview.chromium.org/840553003/diff/20001/content/renderer/fetchers/resource_fetcher_impl.cc#newcode13 content/renderer/fetchers/resource_fetcher_impl.cc:13: #include "third_party/WebKit/public/platform/WebURLError.h" [optional] remove this unused include using ...
5 years, 11 months ago (2015-01-14 04:09:41 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/840553003/40001
5 years, 11 months ago (2015-01-14 11:58:20 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/14698)
5 years, 11 months ago (2015-01-14 13:13:31 UTC) #35
mlamouri (slow - plz ping)
I've also added a couple of empty favicon.ico because some tests read the console and ...
5 years, 11 months ago (2015-01-14 14:31:17 UTC) #36
mlamouri (slow - plz ping)
Marja, could you review the addition of favicon.ico in tools/telemetry/? I've added it to prevent ...
5 years, 11 months ago (2015-01-14 14:44:32 UTC) #38
Sami
On 2015/01/14 14:44:32, Mounir Lamouri wrote: > Marja, could you review the addition of favicon.ico ...
5 years, 11 months ago (2015-01-14 15:04:46 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/840553003/60001
5 years, 11 months ago (2015-01-14 15:15:19 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/14749)
5 years, 11 months ago (2015-01-14 16:27:10 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/840553003/80001
5 years, 11 months ago (2015-01-14 17:46:08 UTC) #45
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 11 months ago (2015-01-14 19:04:13 UTC) #46
commit-bot: I haz the power
5 years, 11 months ago (2015-01-14 19:04:58 UTC) #47
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f484b43ae8679aadeac8cc593b5cb7d5cd9a55c8
Cr-Commit-Position: refs/heads/master@{#311519}

Powered by Google App Engine
This is Rietveld 408576698