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

Issue 1810193002: Fix effective Origin URLs for IDB + Cache for file:/// pages (Closed)

Created:
4 years, 9 months ago by jsbell
Modified:
4 years, 9 months ago
Reviewers:
michaeln, Mike West, jam
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, darin-cc_chromium.org, cmumford, mkwst+moarreviews-renderer_chromium.org, jsbell+idb_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix effective Origin URLs for IDB + Cache for file:/// pages This is a terrible, horrible, no good, very bad hack. Previously, storage APIs (notable, Indexed DB, Cache Storage) would pass the origins they operated on from Blink to Chromium's content/browser as a serialization done through SecurityOrigin->DatabaseIdentifier->String->IPC->String->GURL. That was simplified to SecurityOrigin->String->GURL->IPC. A side effect of this was that pages browsed as file:// URLs would end up as invalid GURLs due to stricter checks in the SecurityOrigin->String step. Special case that conversion to restore the previous behavior. R=michaeln@chromium.org,mkwst@chromium.org BUG=595840 Committed: https://crrev.com/5721760f19e829770503b2aa4e51ff76848f2270 Cr-Commit-Position: refs/heads/master@{#382587}

Patch Set 1 #

Patch Set 2 : Factor out origin->GURL conversion helper #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -12 lines) Patch
M content/child/indexed_db/webidbfactory_impl.cc View 1 4 chunks +6 lines, -5 lines 0 comments Download
A content/child/storage_util.h View 1 1 chunk +24 lines, -0 lines 0 comments Download
A content/child/storage_util.cc View 1 1 chunk +26 lines, -0 lines 0 comments Download
M content/content_child.gypi View 1 2 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (6 generated)
jsbell
I hate this a lot, but we gotta start somewhere. Blink's DatabaseIdentifier doesn't know about ...
4 years, 9 months ago (2016-03-17 22:11:18 UTC) #1
michaeln
lgtm, special casing for file urls is certainly not new :( i'm not sure about ...
4 years, 9 months ago (2016-03-17 22:52:41 UTC) #2
jsbell
Yay, this approach also solves the issue I was seeing over on https://codereview.chromium.org/1779413002/ - which ...
4 years, 9 months ago (2016-03-18 22:22:53 UTC) #3
Mike West
On 2016/03/17 at 22:11:18, jsbell wrote: > This effectively restores that behavior for a special ...
4 years, 9 months ago (2016-03-21 08:28:34 UTC) #4
jsbell
Thanks. Since I need this logic for WebSQL as well I'm going to try and ...
4 years, 9 months ago (2016-03-21 16:23:55 UTC) #5
jsbell
jam@ - can you take a look at the addition of the new file and ...
4 years, 9 months ago (2016-03-21 23:15:16 UTC) #7
jam
lgtm btw what's a good way to get from origin to GURL? i.e. see GURL(origin_.Serialize()) ...
4 years, 9 months ago (2016-03-22 15:35:16 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1810193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1810193002/20001
4 years, 9 months ago (2016-03-22 16:06:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1810193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1810193002/20001
4 years, 9 months ago (2016-03-22 16:09:11 UTC) #14
jsbell
On 2016/03/22 15:35:16, jam wrote: > btw what's a good way to get from origin ...
4 years, 9 months ago (2016-03-22 16:09:59 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-22 16:42:28 UTC) #16
commit-bot: I haz the power
4 years, 9 months ago (2016-03-22 16:44:35 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5721760f19e829770503b2aa4e51ff76848f2270
Cr-Commit-Position: refs/heads/master@{#382587}

Powered by Google App Engine
This is Rietveld 408576698