Bug 1428264 - Do not show chrome urls in storage inspector r=pbro

On investigation it turns out that no storage types are supported for chrome:// urls.

MozReview-Commit-ID: JZcQg5FvfvN

--HG--
extra : rebase_source : ea3ad83a5b81fb77fedf1ec4707294c45b6a5257
This commit is contained in:
Michael Ratcliffe 2018-03-16 14:33:24 +00:00
Родитель 28bf7b2e86
Коммит 04ef7324c7
1 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -163,21 +163,22 @@ StorageActors.defaults = function(typeName, observationTopics) {
}
switch (location.protocol) {
case "about:":
return `${location.protocol}${location.pathname}`;
case "chrome:":
// chrome: URLs do not support storage of any type.
return null;
case "data:":
// data: URLs do not support storage of any type.
return null;
case "about:":
return location.protocol + location.pathname;
case "chrome:":
return location.protocol + location.pathname;
case "file:":
return `${location.protocol}//${location.pathname}`;
case "resource:":
return location.origin + location.pathname;
case "moz-extension:":
return location.origin;
case "javascript:":
return location.href;
case "moz-extension:":
return location.origin;
case "resource:":
return `${location.origin}${location.pathname}`;
default:
// http: or unknown protocol.
return `${location.protocol}//${location.host}`;