New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 794098 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Buried. Ping if important.
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Clean up the origin treatment for `file:` URLs.

Project Member Reported by mkwst@chromium.org, Dec 12 2017

Issue description

`file:` URLs are only mostly opaque in `SecurityOrigin` and `url::Origin`. We need to make some hard decisions about how to align the two. I have opinions.

From an internal thread:

"""
 https://crbug.com/793074  popped up today, and it's the last straw in a string of `file:`-related bugs ( https://crbug.com/788936 , for example). I want to stop having these bugs by breaking whatever's left of `file:`'s capability by finishing the job of making them opaque origins (unless whatever flag controls `block_local_access_from_local_origin_` is also set (also, also we should kill that flag)).

Browsers already diverge significantly with regard to their behavior for `file:` URLs (see https://github.com/whatwg/html/issues/3099). I'm basically suggesting that we adopt something more like Safari's behavior than what we're doing today.
"""
 

Comment 1 by dcheng@chromium.org, Dec 12 2017

What are the downsides to just making it completely opaque when we construct the security origin? I guess we're going to need to support the local access path indefinitely for layout tests, but we can at least make production Chrome not do that, right?

Comment 2 by mkwst@chromium.org, Dec 14 2017

The downsides are that we break things like `localStorage` that folks might be using. The upsides are that we might want to break them. :)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 14 2017

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

commit c8faad16740ae9ae902b60f62be1224271ea3855
Author: Mike West <mkwst@chromium.org>
Date: Thu Dec 14 15:54:04 2017

Add metrics for feature usage on `file:` URLs.

Bug: 794098
Change-Id: I7f2e05edcf08b67b09a00a6707857d38a0d2028e
Reviewed-on: https://chromium-review.googlesource.com/827007
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524075}
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/core/workers/SharedWorker.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/cachestorage/GlobalCacheStorage.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/locks/LockManager.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/storage/DOMWindowStorage.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/c8faad16740ae9ae902b60f62be1224271ea3855/tools/metrics/histograms/enums.xml

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 28

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

commit c8db69e03daa80b17182195e94b8065190ab879c
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Dec 28 01:34:06 2018

Create a separate histograms for use counters in file:// resources

https://crrev.com/c/c8faad16740ae9ae902b60f62be1224271ea3855 introduced
some use counters, but it didn't work because use counters in file://
resources are ignored. Create a separate histograms to address the
issue.

Bug: 794098
Change-Id: I642cb43f01caa527f8f420fd2342a54cc800c24a
Reviewed-on: https://chromium-review.googlesource.com/c/1386464
Reviewed-by: Luna Lu <loonybear@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619106}
[modify] https://crrev.com/c8db69e03daa80b17182195e94b8065190ab879c/third_party/blink/renderer/core/frame/use_counter.cc
[modify] https://crrev.com/c8db69e03daa80b17182195e94b8065190ab879c/third_party/blink/renderer/core/frame/use_counter.h

Comment 5 by yhirano@chromium.org, Jan 18 (5 days ago)

Cc: lunalu@chromium.org
I landed c8db69e03daa80b17182195e94b8065190ab879c, but Nothing appears in the UMA dashboard for "Blink.UseCounter.File.Features" as of today (I tried Windows Dev 73). Is something wrong?

Sign in to add a comment