Why does Firefox developer edition use chrome:// urls to load scripts? [duplicate]

I just downloaded a copy of the new Firefox Developer Edition browser and started to fiddle around with the dev tools.

I noticed that some of the links and scripts were loaded over chrome:// urls, which I thought were registered for Google Chrome.

enter image description here

Here are some of those lines in specific.

<link id="favicon" rel="icon" type="image/png" href="chrome://branding/content/icon32.png"></link>
<link rel="stylesheet" type="text/css" media="all" href="chrome://browser/content/searchSuggestionUI.css"></link>
<link rel="stylesheet" type="text/css" media="all" defer="defer" href="chrome://browser/content/abouthome/aboutHome.css"></link>
<script type="text/javascript;version=1.8" src="chrome://browser/content/abouthome/aboutHome.js"></script>
<script type="text/javascript;version=1.8" src="chrome://browser/content/searchSuggestionUI.js"></script>

I wondered whether they were hijacking chrome assets, but after checking out one of those scripts, I found a Mozilla comment.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

I don't know much about custom protocols or how they are registered or used. What's going on here?


Chrome in this case doesn't refer to the Chrome browser, but the chrome "user interface" part of Firefox.

See https://developer.mozilla.org/en-US/docs/Glossary/Chrome for further information:

Summary

Chrome is originally a term for the parts of a web browser's user interface other than the web page it is showing.

"Chrome" is also often used to refer to the Google Chrome web browser.

...

chrome code or chrome-privileged code is the name given to the JavaScript code in Firefox that implements the browser itself

For future reference, the Mozilla Developer Network (MDN) contains a wealth of knowledge on all things Mozilla.


custom protocols or how they are registered or used

It's important to note that this is not a protocol, but rather a URI scheme. A networking protocol defines the format of communication; a URI scheme specifies the semantics of the URI.

which I thought were registered for Google Chrome

The IANA maintains a list of provisional URI schemes. The chrome scheme is currently registered as a provisional scheme, with two definitions: one for the Mozilla usage, and one for the Google usage.

Of course, it is possible to use your own scheme without officially registering it. But that causes issues when others start using the same scheme name for a different purpose, as has happened here.

One of the RFC 4395 guidelines for registering a provisional scheme is:

  There is not already an entry with the same URI scheme name.  (In
  the unfortunate case that there are multiple, different uses of
  the same scheme name, the IESG may approve a request to modify an
  existing entry to note the separate use.)

Of interest is that both current registered definitions have the same listed contact, who uses a microsoft.com email address - and the original registration template was in 2012, after both Mozilla and Chrome were already using it. So it seems that Mozilla never registered it with the IANA, and now we're in this situation with two different uses of the same scheme name.