New issue
Advanced search Search tips

Issue 701851 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 844925



Sign in to add a comment

Get rid of URLFetcher usage in chrome/browser/extensions/blob_reader.h

Project Member Reported by mek@chromium.org, Mar 15 2017

Issue description

This extensions specific BlobReader class currently uses net::URLFetcher with special "blob:uuid/" urls to read the contents of blobs. We should replace this with directly using storage::BlobReader instead.

This will possibly also enable getting rid of the special casing in BlobProtocolHandler to support blob:uuid urls (although despite the comment in BlobProtocolHandler it appears IDB is also using blob:uuid/ URLs in some situations).
 
Cc: michae...@chromium.org
I will move chrome/browser/extensions/blob_reader to extensions/browser/blob_reader to facilitate removing Chrome dependencies from the feedbackPrivate API.

Although removing it completely would be nice :-)
Now that it is staying, could you please also add NetworkTrafficAnnotation to it instead of NO_TRAFFIC_ANNOTATION_TAG.

https://cs.chromium.org/chromium/src/chrome/browser/extensions/blob_reader.cc?rcl=ad39988f99e82fc0c9e0a389d4d9bf98590ab093&l=40
What do you want exactly for the NetworkTrafficAnnotation? I'm not sure what kind of annotation to create.
I added the template of annotation to the CL.
I don't have any opinion as to whether this should stay or should use URLFetcher or if we should refactor it out completely and replace with storage::BlobReader.

I'm just moving it into a directory with fewer dependencies, so that I can also move another thing that already depends on BlobReader into a directory that also has fewer dependencies.

I wouldn't have the faintest idea what values to use for the network traffic annotation tag. Is this even hitting the network stack?
Even it is not hitting network stack, as it is using network requests interface it needs an annotation stating that it is just local.
I will create a separate CL for it once you landed current CL and we can discuss it there.
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 7 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by mek@chromium.org, Jun 7 2018

Status: Available (was: Untriaged)
Still needs to be done (also more generally no browser code should ever feel the need to go through the network stack to read a blob).

Comment 9 by mek@chromium.org, Jun 14 2018

Owner: mek@chromium.org
Status: Started (was: Available)

Comment 10 by mek@chromium.org, Jun 14 2018

Blocking: 844925
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e073a82516fb034f311904cd8a07718dcc9cb86

commit 9e073a82516fb034f311904cd8a07718dcc9cb86
Author: Marijn Kruisselbrink <mek@chromium.org>
Date: Mon Jun 18 17:48:58 2018

[Blobs] Refactor extensions BlobReader to no longer use blob URLs.

Instead just read the blob through the mojom Blob interface directly.
For now still relying on blob UUIDs, but ultimately code calling into
this should already have a BlobPtr rather than having to ever look it
up from a UUID.

Bug:  701851 
Change-Id: If267c750368cc4a43d52d239b8462cc65d7214bb
Reviewed-on: https://chromium-review.googlesource.com/1101899
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568063}
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/content/browser/blob_storage/chrome_blob_storage_context.cc
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/content/browser/blob_storage/chrome_blob_storage_context.h
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/content/browser/browser_context.cc
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/content/public/browser/browser_context.h
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/extensions/browser/DEPS
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/extensions/browser/blob_reader.cc
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/extensions/browser/blob_reader.h
[modify] https://crrev.com/9e073a82516fb034f311904cd8a07718dcc9cb86/tools/traffic_annotation/summary/annotations.xml

Comment 12 by mek@chromium.org, Jun 18 2018

Status: Fixed (was: Started)

Sign in to add a comment