Bug 1357326 - Remove the b2g top-level directory. r=jet
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 18 Apr 2017 17:40:31 +0900
changeset 401918 39f172a1a15a625cfde68c597877c395f955bfd0
parent 401917 62f2ca894a5161457003cd1a00a48ec942f94f7b
child 401919 36a32dc30701240e5d92ce48e33f457fcea547f5
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjet
bugs1357326
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1357326 - Remove the b2g top-level directory. r=jet
b2g/LICENSE
b2g/Makefile.in
b2g/app.mozbuild
b2g/app/Makefile.in
b2g/app/b2g.js
b2g/app/macbuild/Contents/Info.plist.in
b2g/app/macbuild/Contents/MacOS-files.in
b2g/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
b2g/app/moz.build
b2g/app/nsBrowserApp.cpp
b2g/app/ua-update.json.in
b2g/branding/branding-common.mozbuild
b2g/branding/browserhtml/app.icns
b2g/branding/browserhtml/app.ico
b2g/branding/browserhtml/background.png
b2g/branding/browserhtml/configure.sh
b2g/branding/browserhtml/content/about.png
b2g/branding/browserhtml/content/favicon32.png
b2g/branding/browserhtml/content/icon48.png
b2g/branding/browserhtml/content/icon64.png
b2g/branding/browserhtml/content/jar.mn
b2g/branding/browserhtml/content/logo.png
b2g/branding/browserhtml/content/logoWordmark.png
b2g/branding/browserhtml/content/moz.build
b2g/branding/browserhtml/content/splash.png
b2g/branding/browserhtml/default.png
b2g/branding/browserhtml/disk.icns
b2g/branding/browserhtml/dsstore
b2g/branding/browserhtml/locales/en-US/brand.dtd
b2g/branding/browserhtml/locales/en-US/brand.properties
b2g/branding/browserhtml/locales/jar.mn
b2g/branding/browserhtml/locales/moz.build
b2g/branding/browserhtml/moz.build
b2g/branding/horizon/app.icns
b2g/branding/horizon/app.ico
b2g/branding/horizon/background.png
b2g/branding/horizon/configure.sh
b2g/branding/horizon/content/about.png
b2g/branding/horizon/content/favicon32.png
b2g/branding/horizon/content/icon48.png
b2g/branding/horizon/content/icon64.png
b2g/branding/horizon/content/jar.mn
b2g/branding/horizon/content/logo.png
b2g/branding/horizon/content/logoWordmark.png
b2g/branding/horizon/content/moz.build
b2g/branding/horizon/content/splash.png
b2g/branding/horizon/default.png
b2g/branding/horizon/disk.icns
b2g/branding/horizon/dsstore
b2g/branding/horizon/locales/en-US/brand.dtd
b2g/branding/horizon/locales/en-US/brand.properties
b2g/branding/horizon/locales/jar.mn
b2g/branding/horizon/locales/moz.build
b2g/branding/horizon/moz.build
b2g/branding/official/app.icns
b2g/branding/official/app.ico
b2g/branding/official/background.png
b2g/branding/official/configure.sh
b2g/branding/official/content/about.png
b2g/branding/official/content/favicon32.png
b2g/branding/official/content/icon48.png
b2g/branding/official/content/icon64.png
b2g/branding/official/content/jar.mn
b2g/branding/official/content/logo.png
b2g/branding/official/content/logoWordmark.png
b2g/branding/official/content/moz.build
b2g/branding/official/content/splash.png
b2g/branding/official/default.png
b2g/branding/official/disk.icns
b2g/branding/official/dsstore
b2g/branding/official/locales/en-US/brand.dtd
b2g/branding/official/locales/en-US/brand.properties
b2g/branding/official/locales/jar.mn
b2g/branding/official/locales/moz.build
b2g/branding/official/moz.build
b2g/branding/unofficial/app.icns
b2g/branding/unofficial/app.ico
b2g/branding/unofficial/background.png
b2g/branding/unofficial/configure.sh
b2g/branding/unofficial/content/about.png
b2g/branding/unofficial/content/favicon32.png
b2g/branding/unofficial/content/icon48.png
b2g/branding/unofficial/content/icon64.png
b2g/branding/unofficial/content/jar.mn
b2g/branding/unofficial/content/logo.png
b2g/branding/unofficial/content/logoWordmark.png
b2g/branding/unofficial/content/moz.build
b2g/branding/unofficial/content/splash.png
b2g/branding/unofficial/default.png
b2g/branding/unofficial/disk.icns
b2g/branding/unofficial/dsstore
b2g/branding/unofficial/locales/en-US/brand.dtd
b2g/branding/unofficial/locales/en-US/brand.properties
b2g/branding/unofficial/locales/jar.mn
b2g/branding/unofficial/locales/moz.build
b2g/branding/unofficial/moz.build
b2g/build.mk
b2g/chrome/content/ErrorPage.js
b2g/chrome/content/aboutCertError.xhtml
b2g/chrome/content/arrow.svg
b2g/chrome/content/blank.css
b2g/chrome/content/blank.html
b2g/chrome/content/content.css
b2g/chrome/content/desktop.css
b2g/chrome/content/desktop.js
b2g/chrome/content/devtools/adb.js
b2g/chrome/content/devtools/debugger.js
b2g/chrome/content/devtools/hud.js
b2g/chrome/content/identity.js
b2g/chrome/content/images/arrowdown-16.png
b2g/chrome/content/images/arrowright-16.png
b2g/chrome/content/images/desktop/home-black.png
b2g/chrome/content/images/desktop/home-white.png
b2g/chrome/content/images/desktop/rotate.png
b2g/chrome/content/images/error.png
b2g/chrome/content/images/errorpage-larry-black.png
b2g/chrome/content/images/errorpage-larry-white.png
b2g/chrome/content/images/errorpage-warning.png
b2g/chrome/content/images/exitfullscreen-hdpi.png
b2g/chrome/content/images/fullscreen-hdpi.png
b2g/chrome/content/images/mute-hdpi.png
b2g/chrome/content/images/pause-hdpi.png
b2g/chrome/content/images/play-hdpi.png
b2g/chrome/content/images/scrubber-hdpi.png
b2g/chrome/content/images/throbber.png
b2g/chrome/content/images/unmute-hdpi.png
b2g/chrome/content/netError.css
b2g/chrome/content/screen.js
b2g/chrome/content/settings.js
b2g/chrome/content/shell.css
b2g/chrome/content/shell.html
b2g/chrome/content/shell.js
b2g/chrome/content/shell_remote.html
b2g/chrome/content/shell_remote.js
b2g/chrome/content/test/mochitest/RecordingStatusChromeScript.js
b2g/chrome/content/test/mochitest/RecordingStatusHelper.js
b2g/chrome/content/test/mochitest/file_getusermedia_iframe.html
b2g/chrome/content/test/mochitest/mochitest.ini
b2g/chrome/content/test/mochitest/moz.build
b2g/chrome/content/test/mochitest/test_recordingStatus_basic.html
b2g/chrome/content/test/mochitest/test_recordingStatus_iframe.html
b2g/chrome/content/test/mochitest/test_recordingStatus_kill_content_process.html
b2g/chrome/content/test/mochitest/test_recordingStatus_multiple_requests.html
b2g/chrome/content/touchcontrols.css
b2g/chrome/jar.mn
b2g/chrome/moz.build
b2g/common.configure
b2g/components/AboutServiceWorkers.jsm
b2g/components/ActivityChannel.jsm
b2g/components/AlertsHelper.jsm
b2g/components/AlertsService.js
b2g/components/B2GAboutRedirector.js
b2g/components/B2GComponents.manifest
b2g/components/B2GPresentationDevicePrompt.js
b2g/components/BootstrapCommandLine.js
b2g/components/Bootstraper.jsm
b2g/components/CommandLine.js
b2g/components/ContentPermissionPrompt.js
b2g/components/ContentRequestHelper.jsm
b2g/components/DebuggerActors.js
b2g/components/DirectoryProvider.js
b2g/components/ErrorPage.jsm
b2g/components/FilePicker.js
b2g/components/Frames.jsm
b2g/components/FxAccountsMgmtService.jsm
b2g/components/FxAccountsUIGlue.js
b2g/components/GaiaChrome.cpp
b2g/components/GaiaChrome.h
b2g/components/GlobalSimulatorScreen.jsm
b2g/components/HelperAppDialog.js
b2g/components/LogCapture.jsm
b2g/components/LogParser.jsm
b2g/components/LogShake.jsm
b2g/components/MailtoProtocolHandler.js
b2g/components/OMAContentHandler.js
b2g/components/OopCommandLine.js
b2g/components/OrientationChangeHandler.jsm
b2g/components/PresentationRequestUIGlue.js
b2g/components/ProcessGlobal.js
b2g/components/RecoveryService.js
b2g/components/SafeMode.jsm
b2g/components/Screenshot.jsm
b2g/components/SignInToWebsite.jsm
b2g/components/SimulatorScreen.js
b2g/components/SmsProtocolHandler.js
b2g/components/SystemAppProxy.jsm
b2g/components/SystemMessageInternal.js
b2g/components/TelProtocolHandler.js
b2g/components/TelURIParser.jsm
b2g/components/moz.build
b2g/components/nsIGaiaChrome.idl
b2g/components/nsISystemMessagesInternal.idl
b2g/components/test/mochitest/SandboxPromptTest.html
b2g/components/test/mochitest/filepicker_path_handler_chrome.js
b2g/components/test/mochitest/mochitest.ini
b2g/components/test/mochitest/permission_handler_chrome.js
b2g/components/test/mochitest/presentation_prompt_handler_chrome.js
b2g/components/test/mochitest/presentation_ui_glue_handler_chrome.js
b2g/components/test/mochitest/screenshot_helper.js
b2g/components/test/mochitest/systemapp_helper.js
b2g/components/test/mochitest/test_filepicker_path.html
b2g/components/test/mochitest/test_permission_visibilitychange.html
b2g/components/test/mochitest/test_presentation_device_prompt.html
b2g/components/test/mochitest/test_presentation_request_ui_glue.html
b2g/components/test/mochitest/test_sandbox_permission.html
b2g/components/test/mochitest/test_screenshot.html
b2g/components/test/mochitest/test_systemapp.html
b2g/components/test/moz.build
b2g/components/test/unit/data/test_logger_file
b2g/components/test/unit/head_identity.js
b2g/components/test/unit/head_logshake_gonk.js
b2g/components/test/unit/test_aboutserviceworkers.js
b2g/components/test/unit/test_bug793310.js
b2g/components/test/unit/test_bug832946.js
b2g/components/test/unit/test_fxaccounts.js
b2g/components/test/unit/test_logcapture.js
b2g/components/test/unit/test_logcapture_gonk.js
b2g/components/test/unit/test_logparser.js
b2g/components/test/unit/test_logshake.js
b2g/components/test/unit/test_logshake_gonk.js
b2g/components/test/unit/test_logshake_gonk_compression.js
b2g/components/test/unit/test_logshake_readLog_gonk.js
b2g/components/test/unit/test_signintowebsite.js
b2g/components/test/unit/xpcshell.ini
b2g/config/aries/config.json
b2g/config/aries/releng-aries.manifest
b2g/config/aries/sources.xml
b2g/config/desktop/config.json
b2g/config/gaia.json
b2g/config/mozconfigs/common
b2g/config/mozconfigs/common.override
b2g/config/mozconfigs/ics_armv7a_gecko/debug
b2g/config/mozconfigs/ics_armv7a_gecko/nightly
b2g/config/mozconfigs/linux32_gecko/debug
b2g/config/mozconfigs/linux32_gecko/nightly
b2g/config/mozconfigs/linux64_gecko/nightly
b2g/config/mozconfigs/macosx64_gecko/debug
b2g/config/mozconfigs/macosx64_gecko/nightly
b2g/config/mozconfigs/win32_gecko/debug
b2g/config/mozconfigs/win32_gecko/nightly
b2g/config/nexus-5-l/config.json
b2g/config/nexus-5-l/releng-nexus5.manifest
b2g/config/nexus-5-l/sources.xml
b2g/config/tooltool-manifests/linux32/releng.manifest
b2g/config/tooltool-manifests/macosx64/releng.manifest
b2g/config/tooltool-manifests/win32/releng.manifest
b2g/confvars.sh
b2g/dev/app.mozbuild
b2g/dev/app/moz.build
b2g/dev/app/mulet.js
b2g/dev/build.mk
b2g/dev/config/mozconfigs/linux64/mulet
b2g/dev/config/mozconfigs/linux64/mulet-hazards
b2g/dev/config/mozconfigs/linux64/mulet_dbg
b2g/dev/config/mozconfigs/macosx64/mulet
b2g/dev/config/mozconfigs/win32/mulet
b2g/dev/config/tooltool-manifests/linux64/hazard.manifest
b2g/dev/config/tooltool-manifests/linux64/releng.manifest
b2g/dev/config/tooltool-manifests/macosx64/releng.manifest
b2g/dev/config/tooltool-manifests/win32/releng.manifest
b2g/dev/confvars.sh
b2g/dev/moz.configure
b2g/gaia/Makefile.in
b2g/gaia/moz.build
b2g/gaia/run-b2g.c
b2g/gaia/run-b2g.cpp
b2g/graphene/app.mozbuild
b2g/graphene/build.mk
b2g/graphene/config/horizon-mozconfigs/common
b2g/graphene/config/horizon-mozconfigs/common.override
b2g/graphene/config/horizon-mozconfigs/linux32/debug
b2g/graphene/config/horizon-mozconfigs/linux32/nightly
b2g/graphene/config/horizon-mozconfigs/linux64/debug
b2g/graphene/config/horizon-mozconfigs/linux64/nightly
b2g/graphene/config/horizon-mozconfigs/macosx64/debug
b2g/graphene/config/horizon-mozconfigs/macosx64/nightly
b2g/graphene/config/horizon-mozconfigs/win32/debug
b2g/graphene/config/horizon-mozconfigs/win32/nightly
b2g/graphene/config/horizon-mozconfigs/win64/debug
b2g/graphene/config/horizon-mozconfigs/win64/nightly
b2g/graphene/config/mozconfigs/common
b2g/graphene/config/mozconfigs/common.override
b2g/graphene/config/mozconfigs/linux32/debug
b2g/graphene/config/mozconfigs/linux32/nightly
b2g/graphene/config/mozconfigs/linux64/debug
b2g/graphene/config/mozconfigs/linux64/nightly
b2g/graphene/config/mozconfigs/macosx64/debug
b2g/graphene/config/mozconfigs/macosx64/nightly
b2g/graphene/config/mozconfigs/win32/debug
b2g/graphene/config/mozconfigs/win32/nightly
b2g/graphene/config/mozconfigs/win64/debug
b2g/graphene/config/mozconfigs/win64/nightly
b2g/graphene/confvars.sh
b2g/graphene/graphene.js
b2g/graphene/moz.configure
b2g/graphene/settings.json
b2g/installer/Makefile.in
b2g/installer/flash.bat
b2g/installer/moz.build
b2g/installer/package-manifest.in
b2g/installer/removed-files.in
b2g/locales/Makefile.in
b2g/locales/all-locales
b2g/locales/en-US/b2g-l10n.js
b2g/locales/en-US/chrome/graphene.properties
b2g/locales/en-US/chrome/overrides/aboutCertError.dtd
b2g/locales/en-US/chrome/overrides/appstrings.properties
b2g/locales/en-US/defines.inc
b2g/locales/filter.py
b2g/locales/jar.mn
b2g/locales/l10n.ini
b2g/locales/moz.build
b2g/moz.build
b2g/moz.configure
b2g/simulator/bootstrap.js
b2g/simulator/build_xpi.py
b2g/simulator/custom-prefs.js
b2g/simulator/custom-settings.json
b2g/simulator/icon.png
b2g/simulator/icon64.png
b2g/simulator/install.rdf.in
b2g/test/b2g-unittest-requirements.txt
b2g/test/emulator.manifest
deleted file mode 100644
--- a/b2g/LICENSE
+++ /dev/null
@@ -1,373 +0,0 @@
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
-    means each individual or legal entity that creates, contributes to
-    the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
-    means the combination of the Contributions of others (if any) used
-    by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
-    means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
-    means Source Code Form to which the initial Contributor has attached
-    the notice in Exhibit A, the Executable Form of such Source Code
-    Form, and Modifications of such Source Code Form, in each case
-    including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
-    means
-
-    (a) that the initial Contributor has attached the notice described
-        in Exhibit B to the Covered Software; or
-
-    (b) that the Covered Software was made available under the terms of
-        version 1.1 or earlier of the License, but not also under the
-        terms of a Secondary License.
-
-1.6. "Executable Form"
-    means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
-    means a work that combines Covered Software with other material, in 
-    a separate file or files, that is not Covered Software.
-
-1.8. "License"
-    means this document.
-
-1.9. "Licensable"
-    means having the right to grant, to the maximum extent possible,
-    whether at the time of the initial grant or subsequently, any and
-    all of the rights conveyed by this License.
-
-1.10. "Modifications"
-    means any of the following:
-
-    (a) any file in Source Code Form that results from an addition to,
-        deletion from, or modification of the contents of Covered
-        Software; or
-
-    (b) any new file in Source Code Form that contains any Covered
-        Software.
-
-1.11. "Patent Claims" of a Contributor
-    means any patent claim(s), including without limitation, method,
-    process, and apparatus claims, in any patent Licensable by such
-    Contributor that would be infringed, but for the grant of the
-    License, by the making, using, selling, offering for sale, having
-    made, import, or transfer of either its Contributions or its
-    Contributor Version.
-
-1.12. "Secondary License"
-    means either the GNU General Public License, Version 2.0, the GNU
-    Lesser General Public License, Version 2.1, the GNU Affero General
-    Public License, Version 3.0, or any later versions of those
-    licenses.
-
-1.13. "Source Code Form"
-    means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
-    means an individual or a legal entity exercising rights under this
-    License. For legal entities, "You" includes any entity that
-    controls, is controlled by, or is under common control with You. For
-    purposes of this definition, "control" means (a) the power, direct
-    or indirect, to cause the direction or management of such entity,
-    whether by contract or otherwise, or (b) ownership of more than
-    fifty percent (50%) of the outstanding shares or beneficial
-    ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
-    Licensable by such Contributor to use, reproduce, make available,
-    modify, display, perform, distribute, and otherwise exploit its
-    Contributions, either on an unmodified basis, with Modifications, or
-    as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
-    for sale, have made, import, and otherwise transfer either its
-    Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
-    or
-
-(b) for infringements caused by: (i) Your and any other third party's
-    modifications of Covered Software, or (ii) the combination of its
-    Contributions with other software (except as part of its Contributor
-    Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
-    its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
-    Form, as described in Section 3.1, and You must inform recipients of
-    the Executable Form how they can obtain a copy of such Source Code
-    Form by reasonable means in a timely manner, at a charge no more
-    than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
-    License, or sublicense it under different terms, provided that the
-    license for the Executable Form does not attempt to limit or alter
-    the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-*                                                                      *
-*  6. Disclaimer of Warranty                                           *
-*  -------------------------                                           *
-*                                                                      *
-*  Covered Software is provided under this License on an "as is"       *
-*  basis, without warranty of any kind, either expressed, implied, or  *
-*  statutory, including, without limitation, warranties that the       *
-*  Covered Software is free of defects, merchantable, fit for a        *
-*  particular purpose or non-infringing. The entire risk as to the     *
-*  quality and performance of the Covered Software is with You.        *
-*  Should any Covered Software prove defective in any respect, You     *
-*  (not any Contributor) assume the cost of any necessary servicing,   *
-*  repair, or correction. This disclaimer of warranty constitutes an   *
-*  essential part of this License. No use of any Covered Software is   *
-*  authorized under this License except under this disclaimer.         *
-*                                                                      *
-************************************************************************
-
-************************************************************************
-*                                                                      *
-*  7. Limitation of Liability                                          *
-*  --------------------------                                          *
-*                                                                      *
-*  Under no circumstances and under no legal theory, whether tort      *
-*  (including negligence), contract, or otherwise, shall any           *
-*  Contributor, or anyone who distributes Covered Software as          *
-*  permitted above, be liable to You for any direct, indirect,         *
-*  special, incidental, or consequential damages of any character      *
-*  including, without limitation, damages for lost profits, loss of    *
-*  goodwill, work stoppage, computer failure or malfunction, or any    *
-*  and all other commercial damages or losses, even if such party      *
-*  shall have been informed of the possibility of such damages. This   *
-*  limitation of liability shall not apply to liability for death or   *
-*  personal injury resulting from such party's negligence to the       *
-*  extent applicable law prohibits such limitation. Some               *
-*  jurisdictions do not allow the exclusion or limitation of           *
-*  incidental or consequential damages, so this exclusion and          *
-*  limitation may not apply to You.                                    *
-*                                                                      *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
-  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/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
-  This Source Code Form is "Incompatible With Secondary Licenses", as
-  defined by the Mozilla Public License, v. 2.0.
deleted file mode 100644
--- a/b2g/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-include $(topsrcdir)/testing/testsuite-targets.mk
deleted file mode 100644
--- a/b2g/app.mozbuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# vim: set filetype=python:
-# 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/.
-
-
-include('/toolkit/toolkit.mozbuild')
-
-if CONFIG['MOZ_EXTENSIONS']:
-    DIRS += ['/extensions']
-
-DIRS += [
-    '/%s' % CONFIG['MOZ_BRANDING_DIRECTORY'],
-    '/b2g',
-]
deleted file mode 100644
--- a/b2g/app/Makefile.in
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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/.
-
-# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
-NSDISTMODE = copy
-
-include $(topsrcdir)/config/rules.mk
-
-APP_ICON = app
-
-APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-
-APP_NAME = $(MOZ_APP_DISPLAYNAME)
-APP_VERSION = $(MOZ_APP_VERSION)
-
-ifdef MOZ_DEBUG
-APP_NAME := $(APP_NAME)Debug
-endif
-
-AB_CD = $(MOZ_UI_LOCALE)
-
-ifeq (zh-TW,$(AB_CD))
-LPROJ_ROOT := $(subst -,_,$(AB_CD))
-else
-LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD)))
-endif
-LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
-
-clean clobber repackage::
-	rm -rf $(DIST)/$(APP_NAME).app
-
-libs-preqs = \
-  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \
-  $(call mkdir_deps,$(DIST)/$(APP_NAME).app/$(LPROJ)) \
-  $(NULL)
-
-.PHONY: repackage
-tools repackage:: $(libs-preqs)
-	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
-	rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/$(LPROJ)
-	sed -e 's/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' -e 's/%APP_BINARY%/$(APP_BINARY)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
-	sed -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/$(LPROJ)/InfoPlist.strings
-	rsync -a --exclude 'mangle' --exclude 'shlibsign' --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/Resources
-	rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS
-	$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
-	rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
-	cp -RL $(DIST)/branding/app.icns $(DIST)/$(APP_NAME).app/Contents/Resources/$(MOZ_APP_NAME).icns
-	printf APPLMOZB > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
-
-else # MOZ_WIDGET_TOOLKIT != cocoa
-
-libs::
-	$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
-
-# Copy the app icon for b2g-desktop
-ifeq ($(OS_ARCH),WINNT)
-	cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
-	cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/default.ico
-else ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
-	cp $(DIST)/branding/default.png $(DIST)/bin/chrome/icons/default/default.png
-endif
-
-endif
deleted file mode 100644
--- a/b2g/app/b2g.js
+++ /dev/null
@@ -1,941 +0,0 @@
-/* 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/. */
-
-#filter substitution
-
-// For the all MOZ_MULET ifdef conditions in this file: see bug 1174234
-
-#ifndef MOZ_MULET
-pref("toolkit.defaultChromeURI", "chrome://b2g/content/shell.html");
-pref("browser.chromeURL", "chrome://b2g/content/");
-#endif
-
-#ifdef MOZ_MULET
-// Set FxOS as the default homepage
-// bug 1000122: this pref is fetched as a complex value,
-// so that it can't be set a just a string.
-// data: url is a workaround this.
-pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=chrome://b2g/content/shell.html");
-pref("b2g.is_mulet", true);
-// Prevent having the firstrun page
-pref("startup.homepage_welcome_url", "");
-pref("browser.shell.checkDefaultBrowser", false);
-// Automatically open devtools on the firefox os panel
-pref("devtools.toolbox.host", "side");
-pref("devtools.toolbox.sidebar.width", 800);
-// Disable session store to ensure having only one tab opened
-pref("browser.sessionstore.max_tabs_undo", 0);
-pref("browser.sessionstore.max_windows_undo", 0);
-pref("browser.sessionstore.restore_on_demand", false);
-pref("browser.sessionstore.resume_from_crash", false);
-// No e10s on mulet
-pref("browser.tabs.remote.autostart.1", false);
-pref("browser.tabs.remote.autostart.2", false);
-#endif
-
-// Bug 945235: Prevent all bars to be considered visible:
-pref("toolkit.defaultChromeFeatures", "chrome,dialog=no,close,resizable,scrollbars,extrachrome");
-
-// Disable focus rings
-pref("browser.display.focus_ring_width", 0);
-
-// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
-pref("browser.viewport.scaleRatio", -1);
-
-/* disable text selection */
-pref("browser.ignoreNativeFrameTextSelection", true);
-
-/* cache prefs */
-#ifdef MOZ_WIDGET_GONK
-pref("browser.cache.disk.enable", true);
-pref("browser.cache.disk.capacity", 55000); // kilobytes
-pref("browser.cache.disk.parent_directory", "/cache");
-#endif
-pref("browser.cache.disk.smart_size.enabled", false);
-pref("browser.cache.disk.smart_size.first_run", false);
-
-pref("browser.cache.memory.enable", true);
-pref("browser.cache.memory.capacity", 1024); // kilobytes
-
-pref("browser.cache.memory_limit", 2048); // 2 MB
-
-/* image cache prefs */
-pref("image.cache.size", 1048576); // bytes
-pref("canvas.image.cache.limit", 20971520); // 20 MB
-
-/* offline cache prefs */
-pref("browser.offline-apps.notify", false);
-pref("browser.cache.offline.enable", true);
-pref("offline-apps.allow_by_default", true);
-
-/* protocol warning prefs */
-pref("network.protocol-handler.warn-external.tel", false);
-pref("network.protocol-handler.warn-external.mailto", false);
-pref("network.protocol-handler.warn-external.vnd.youtube", false);
-
-/* http prefs */
-pref("network.http.pipelining", true);
-pref("network.http.pipelining.ssl", true);
-pref("network.http.proxy.pipelining", true);
-pref("network.http.pipelining.maxrequests" , 6);
-pref("network.http.keep-alive.timeout", 109);
-pref("network.http.max-connections", 20);
-pref("network.http.max-persistent-connections-per-server", 6);
-pref("network.http.max-persistent-connections-per-proxy", 20);
-
-// Keep the old default of accepting all cookies,
-// no matter if you already visited the website or not
-pref("network.cookie.cookieBehavior", 0);
-
-// spdy
-pref("network.http.spdy.push-allowance", 32768);
-pref("network.http.spdy.default-hpack-buffer", 4096); // 4k
-
-// See bug 545869 for details on why these are set the way they are
-pref("network.buffer.cache.count", 24);
-pref("network.buffer.cache.size",  16384);
-
-// predictive actions
-pref("network.predictor.enabled", false); // disabled on b2g
-pref("network.predictor.max-db-size", 2097152); // bytes
-pref("network.predictor.preserve", 50); // percentage of predictor data to keep when cleaning up
-
-/* session history */
-pref("browser.sessionhistory.max_entries", 50);
-pref("browser.sessionhistory.contentViewerTimeout", 360);
-
-/* session store */
-pref("browser.sessionstore.resume_session_once", false);
-pref("browser.sessionstore.resume_from_crash", true);
-pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
-pref("browser.sessionstore.interval", 10000); // milliseconds
-pref("browser.sessionstore.max_tabs_undo", 1);
-
-/* these should help performance */
-pref("mozilla.widget.force-24bpp", true);
-pref("mozilla.widget.use-buffer-pixmap", true);
-pref("mozilla.widget.disable-native-theme", true);
-pref("layout.reflow.synthMouseMove", false);
-#ifndef MOZ_X11
-pref("layers.enable-tiles", true);
-#endif
-pref("layers.low-precision-buffer", true);
-pref("layers.low-precision-opacity", "0.5");
-pref("layers.progressive-paint", true);
-
-/* download manager (don't show the window or alert) */
-pref("browser.download.useDownloadDir", true);
-pref("browser.download.folderList", 1); // Default to ~/Downloads
-pref("browser.download.manager.showAlertOnComplete", false);
-pref("browser.download.manager.showAlertInterval", 2000);
-pref("browser.download.manager.retention", 2);
-pref("browser.download.manager.showWhenStarting", false);
-pref("browser.download.manager.closeWhenDone", true);
-pref("browser.download.manager.openDelay", 0);
-pref("browser.download.manager.focusWhenStarting", false);
-pref("browser.download.manager.flashCount", 2);
-pref("browser.download.manager.displayedHistoryDays", 7);
-
-/* download helper */
-pref("browser.helperApps.deleteTempFileOnExit", false);
-
-/* password manager */
-pref("signon.rememberSignons", true);
-pref("signon.expireMasterPassword", false);
-
-/* autocomplete */
-pref("browser.formfill.enable", true);
-
-/* spellcheck */
-pref("layout.spellcheckDefault", 0);
-
-/* block popups by default, and notify the user about blocked popups */
-pref("dom.disable_open_during_load", true);
-pref("privacy.popups.showBrowserMessage", true);
-
-pref("keyword.enabled", true);
-pref("browser.fixup.domainwhitelist.localhost", true);
-
-pref("accessibility.typeaheadfind", false);
-pref("accessibility.typeaheadfind.timeout", 5000);
-pref("accessibility.typeaheadfind.flashBar", 1);
-pref("accessibility.typeaheadfind.linksonly", false);
-pref("accessibility.typeaheadfind.casesensitive", 0);
-
-// SSL error page behaviour
-pref("browser.ssl_override_behavior", 2);
-pref("browser.xul.error_pages.expert_bad_cert", false);
-
-// disable updating
-pref("browser.search.update", false);
-
-// tell the search service that we don't really expose the "current engine"
-pref("browser.search.noCurrentEngine", true);
-
-// enable xul error pages
-pref("browser.xul.error_pages.enabled", true);
-
-// disable color management
-pref("gfx.color_management.mode", 0);
-
-// don't allow JS to move and resize existing windows
-pref("dom.disable_window_move_resize", true);
-
-// prevent click image resizing for nsImageDocument
-pref("browser.enable_click_image_resizing", false);
-
-// controls which bits of private data to clear. by default we clear them all.
-pref("privacy.item.cache", true);
-pref("privacy.item.cookies", true);
-pref("privacy.item.offlineApps", true);
-pref("privacy.item.history", true);
-pref("privacy.item.formdata", true);
-pref("privacy.item.downloads", true);
-pref("privacy.item.passwords", true);
-pref("privacy.item.sessions", true);
-pref("privacy.item.geolocation", true);
-pref("privacy.item.siteSettings", true);
-pref("privacy.item.syncAccount", true);
-
-// base url for the wifi geolocation network provider
-pref("geo.provider.use_mls", false);
-pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
-
-// base url for the stumbler
-pref("geo.stumbler.url", "https://location.services.mozilla.com/v1/geosubmit?key=%MOZILLA_API_KEY%");
-
-// enable geo
-pref("geo.enabled", true);
-
-// content sink control -- controls responsiveness during page load
-// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
-pref("content.sink.enable_perf_mode",  2); // 0 - switch, 1 - interactive, 2 - perf
-pref("content.sink.pending_event_mode", 0);
-pref("content.sink.perf_deflect_count", 1000000);
-pref("content.sink.perf_parse_time", 50000000);
-
-// Maximum scripts runtime before showing an alert
-// Disable the watchdog thread for B2G. See bug 870043 comment 31.
-pref("dom.use_watchdog", false);
-
-// The slow script dialog can be triggered from inside the JS engine as well,
-// ensure that those calls don't accidentally trigger the dialog.
-pref("dom.max_script_run_time", 0);
-pref("dom.max_chrome_script_run_time", 0);
-
-// plugins
-pref("plugin.disable", true);
-pref("dom.ipc.plugins.enabled", true);
-
-// product URLs
-// The breakpad report server to link to in about:crashes
-pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
-pref("app.releaseNotesURL", "https://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/");
-pref("app.support.baseURL", "https://support.mozilla.com/b2g");
-pref("app.privacyURL", "https://www.mozilla.com/%LOCALE%/m/privacy.html");
-pref("app.creditsURL", "https://www.mozilla.org/credits/");
-pref("app.featuresURL", "https://www.mozilla.com/%LOCALE%/b2g/features/");
-pref("app.faqURL", "https://www.mozilla.com/%LOCALE%/b2g/faq/");
-
-// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
-pref("security.alternate_certificate_error_page", "certerror");
-
-pref("security.warn_viewing_mixed", false); // Warning is disabled.  See Bug 616712.
-
-// Block insecure active content on https pages
-pref("security.mixed_content.block_active_content", true);
-
-// 2 = strict certificate pinning checks.
-// This default preference is more strict than Firefox because B2G
-// currently does not have a way to install local root certificates.
-// Strict checking is effectively equivalent to non-strict checking as
-// long as that is true.  If an ability to add local certificates is
-// added, there may be a need to change this pref.
-pref("security.cert_pinning.enforcement_level", 2);
-
-
-// Override some named colors to avoid inverse OS themes
-pref("ui.-moz-dialog", "#efebe7");
-pref("ui.-moz-dialogtext", "#101010");
-pref("ui.-moz-field", "#fff");
-pref("ui.-moz-fieldtext", "#1a1a1a");
-pref("ui.-moz-buttonhoverface", "#f3f0ed");
-pref("ui.-moz-buttonhovertext", "#101010");
-pref("ui.-moz-combobox", "#fff");
-pref("ui.-moz-comboboxtext", "#101010");
-pref("ui.buttonface", "#ece7e2");
-pref("ui.buttonhighlight", "#fff");
-pref("ui.buttonshadow", "#aea194");
-pref("ui.buttontext", "#101010");
-pref("ui.captiontext", "#101010");
-pref("ui.graytext", "#b1a598");
-pref("ui.highlighttext", "#1a1a1a");
-pref("ui.threeddarkshadow", "#000");
-pref("ui.threedface", "#ece7e2");
-pref("ui.threedhighlight", "#fff");
-pref("ui.threedlightshadow", "#ece7e2");
-pref("ui.threedshadow", "#aea194");
-pref("ui.windowframe", "#efebe7");
-
-pref("ui.menu", "#f97c17");
-pref("ui.menutext", "#ffffff");
-pref("ui.infobackground", "#343e40");
-pref("ui.infotext", "#686868");
-pref("ui.window", "#ffffff");
-pref("ui.windowtext", "#000000");
-pref("ui.highlight", "#b2f2ff");
-
-// replace newlines with spaces on paste into single-line text boxes
-pref("editor.singleLine.pasteNewlines", 2);
-
-// threshold where a tap becomes a drag, in 1/240" reference pixels
-// The names of the preferences are to be in sync with EventStateManager.cpp
-pref("ui.dragThresholdX", 25);
-pref("ui.dragThresholdY", 25);
-
-// Layers Acceleration.  We can only have nice things on gonk, because
-// they're not maintained anywhere else.
-#ifndef MOZ_WIDGET_GONK
-pref("dom.ipc.tabs.disabled", true);
-pref("layers.async-pan-zoom.enabled", false);
-#else
-pref("dom.ipc.tabs.disabled", false);
-pref("layers.acceleration.disabled", false);
-pref("gfx.content.azure.backends", "cairo");
-#endif
-
-// Web Notifications
-pref("notification.feature.enabled", true);
-
-// prevent video elements from preloading too much data
-pref("media.preload.default", 1); // default to preload none
-pref("media.preload.auto", 2);    // preload metadata if preload=auto
-pref("media.cache_size", 4096);    // 4MB media cache
-// Try to save battery by not resuming reading from a connection until we fall
-// below 10s of buffered data.
-pref("media.cache_resume_threshold", 10);
-pref("media.cache_readahead_limit", 30);
-
-#ifdef MOZ_FMP4
-// Enable/Disable Gonk Decoder Module
-pref("media.gonk.enabled", true);
-#endif
-
-//Encrypted media extensions.
-pref("media.eme.enabled", true);
-// The default number of decoded video frames that are enqueued in
-// MediaDecoderReader's mVideoQueue.
-pref("media.video-queue.default-size", 3);
-
-// optimize images' memory usage
-pref("image.downscale-during-decode.enabled", true);
-pref("image.mem.allow_locking_in_content_processes", true);
-// Limit the surface cache to 1/8 of main memory or 128MB, whichever is smaller.
-// Almost everything that was factored into 'max_decoded_image_kb' is now stored
-// in the surface cache.  1/8 of main memory is 32MB on a 256MB device, which is
-// about the same as the old 'max_decoded_image_kb'.
-pref("image.mem.surfacecache.max_size_kb", 131072);  // 128MB
-pref("image.mem.surfacecache.size_factor", 8);  // 1/8 of main memory
-pref("image.mem.surfacecache.discard_factor", 2);  // Discard 1/2 of the surface cache at a time.
-pref("image.mem.surfacecache.min_expiration_ms", 86400000); // 24h, we rely on the out of memory hook
-
-pref("dom.w3c_touch_events.safetyX", 0); // escape borders in units of 1/240"
-pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
-
-// True if this is the first time we are showing about:firstrun
-pref("browser.firstrun.show.uidiscovery", true);
-pref("browser.firstrun.show.localepicker", true);
-
-// initiated by a user
-pref("content.ime.strict_policy", true);
-
-// True if you always want dump() to work
-//
-// On Android, you also need to do the following for the output
-// to show up in logcat:
-//
-// $ adb shell stop
-// $ adb shell setprop log.redirect-stdio true
-// $ adb shell start
-pref("browser.dom.window.dump.enabled", false);
-
-// Default Content Security Policy to apply to certified apps.
-// If you change this CSP, make sure to update the fast path in nsCSPService.cpp
-pref("security.apps.certified.CSP.default", "default-src * data: blob:; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline' app://theme.gaiamobile.org");
-
-// handle links targeting new windows
-// 1=current window/tab, 2=new window, 3=new tab in most recent window
-pref("browser.link.open_newwindow", 3);
-
-// 0: no restrictions - divert everything
-// 1: don't divert window.open at all
-// 2: don't divert window.open with features
-pref("browser.link.open_newwindow.restriction", 0);
-
-// Enable browser frames (including OOP, except on Windows, where it doesn't
-// work), but make in-process browser frames the default.
-pref("dom.mozBrowserFramesEnabled", true);
-
-// Enable a (virtually) unlimited number of mozbrowser processes.
-// We'll run out of PIDs on UNIX-y systems before we hit this limit.
-pref("dom.ipc.processCount", 100000);
-
-pref("dom.ipc.browser_frames.oop_by_default", false);
-
-#if !defined(MOZ_MULET) && !defined(MOZ_GRAPHENE)
-pref("dom.meta-viewport.enabled", true);
-#endif
-
-//The waiting time in network manager.
-pref("network.gonk.ms-release-mms-connection", 30000);
-
-// Shortnumber matching needed for e.g. Brazil:
-// 03187654321 can be found with 87654321
-pref("dom.phonenumber.substringmatching.BR", 8);
-pref("dom.phonenumber.substringmatching.CO", 10);
-pref("dom.phonenumber.substringmatching.VE", 7);
-pref("dom.phonenumber.substringmatching.CL", 8);
-pref("dom.phonenumber.substringmatching.PE", 7);
-
-#ifdef MOZ_WIDGET_GONK
-pref("dom.webapps.firstRunWithSIM", true);
-#endif
-
-#ifdef MOZ_B2G_RIL
-// SingleVariant
-pref("dom.mozApps.single_variant_sourcedir", "/persist/svoperapps");
-#endif
-
-// controls if we want camera support
-pref("device.camera.enabled", true);
-pref("media.realtime_decoder.enabled", true);
-
-// TCPSocket
-pref("dom.mozTCPSocket.enabled", true);
-
-// Handle hardware buttons in the b2g chrome package
-pref("b2g.keys.menu.enabled", true);
-
-// Display simulator software buttons
-pref("b2g.software-buttons", false);
-
-// Screen timeout in seconds
-pref("power.screen.timeout", 60);
-
-pref("full-screen-api.enabled", true);
-
-#ifndef MOZ_WIDGET_GONK
-// If we're not actually on physical hardware, don't make the top level widget
-// fullscreen when transitioning to fullscreen. This means in emulated
-// environments (like the b2g desktop client) we won't make the client window
-// fill the whole screen, we'll just make the content fill the client window,
-// i.e. it won't give the impression to content that the number of device
-// screen pixels changes!
-pref("full-screen-api.ignore-widgets", true);
-#endif
-
-pref("media.volume.steps", 10);
-
-#ifdef MOZ_UPDATER
-// When we're applying updates, we can't let anything hang us on
-// quit+restart.  The user has no recourse.
-pref("shutdown.watchdog.timeoutSecs", 10);
-// Timeout before the update prompt automatically installs the update
-pref("b2g.update.apply-prompt-timeout", 60000); // milliseconds
-// Amount of time to wait after the user is idle before prompting to apply an update
-pref("b2g.update.apply-idle-timeout", 600000); // milliseconds
-// Amount of time after which connection will be restarted if no progress
-pref("b2g.update.download-watchdog-timeout", 120000); // milliseconds
-pref("b2g.update.download-watchdog-max-retries", 5);
-
-pref("app.update.enabled", true);
-pref("app.update.auto", false);
-pref("app.update.silent", false);
-pref("app.update.staging.enabled", true);
-pref("app.update.service.enabled", true);
-
-pref("app.update.url", "https://aus5.mozilla.org/update/5/%PRODUCT%/%VERSION%/%BUILD_ID%/%PRODUCT_DEVICE%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%IMEI%/update.xml");
-pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
-
-// Interval at which update manifest is fetched.  In units of seconds.
-pref("app.update.interval", 86400); // 1 day
-// Don't throttle background updates.
-pref("app.update.download.backgroundInterval", 0);
-
-// Retry update socket connections every 30 seconds in the cases of certain kinds of errors
-pref("app.update.socket.retryTimeout", 30000);
-
-// Max of 20 consecutive retries (total 10 minutes) before giving up and marking
-// the update download as failed.
-// Note: Offline errors will always retry when the network comes online.
-pref("app.update.socket.maxErrors", 20);
-
-// Enable update logging for now, to diagnose growing pains in the
-// field.
-pref("app.update.log", true);
-#else
-// Explicitly disable the shutdown watchdog.  It's enabled by default.
-// When the updater is disabled, we want to know about shutdown hangs.
-pref("shutdown.watchdog.timeoutSecs", -1);
-#endif
-
-// Allow webapps update checking
-pref("webapps.update.enabled", true);
-
-// Check daily for apps updates.
-pref("webapps.update.interval", 86400);
-
-// Extensions preferences
-pref("extensions.update.enabled", false);
-pref("extensions.getAddons.cache.enabled", false);
-
-// Context Menu
-pref("ui.click_hold_context_menus", true);
-pref("ui.click_hold_context_menus.delay", 400);
-
-// Enable device storage
-pref("device.storage.enabled", true);
-
-// Enable pre-installed applications
-pref("dom.webapps.useCurrentProfile", true);
-
-// Enable system message
-pref("dom.sysmsg.enabled", true);
-pref("media.plugins.enabled", false);
-pref("media.rtsp.enabled", true);
-pref("media.rtsp.video.enabled", true);
-
-// Disable printing (particularly, window.print())
-pref("dom.disable_window_print", true);
-
-// Disable window.showModalDialog
-pref("dom.disable_window_showModalDialog", true);
-
-// Enable new experimental html forms
-pref("dom.experimental_forms", true);
-pref("dom.forms.number", true);
-
-// Don't enable <input type=color> yet as we don't have a color picker
-// implemented for b2g (bug 875751)
-pref("dom.forms.color", false);
-
-// This preference instructs the JS engine to discard the
-// source of any privileged JS after compilation. This saves
-// memory, but makes things like Function.prototype.toSource()
-// fail.
-pref("javascript.options.discardSystemSource", true);
-
-// XXXX REMOVE FOR PRODUCTION. Turns on GC and CC logging
-pref("javascript.options.mem.log", false);
-
-// Increase mark slice time from 10ms to 30ms
-pref("javascript.options.mem.gc_incremental_slice_ms", 30);
-
-// Increase time to get more high frequency GC on benchmarks from 1000ms to 1500ms
-pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1500);
-
-pref("javascript.options.mem.gc_high_frequency_heap_growth_max", 300);
-pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 120);
-pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40);
-pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 0);
-pref("javascript.options.mem.gc_low_frequency_heap_growth", 120);
-pref("javascript.options.mem.high_water_mark", 6);
-pref("javascript.options.mem.gc_allocation_threshold_mb", 1);
-pref("javascript.options.mem.gc_min_empty_chunk_count", 1);
-pref("javascript.options.mem.gc_max_empty_chunk_count", 2);
-
-// Show/Hide scrollbars when active/inactive
-pref("ui.showHideScrollbars", 1);
-pref("ui.useOverlayScrollbars", 1);
-pref("ui.scrollbarFadeBeginDelay", 450);
-pref("ui.scrollbarFadeDuration", 0);
-
-// Scrollbar position follows the document `dir` attribute
-pref("layout.scrollbar.side", 1);
-
-// CSS Scroll Snapping
-pref("layout.css.scroll-snap.enabled", true);
-
-// Enable the ProcessPriorityManager, and give processes with no visible
-// documents a 1s grace period before they're eligible to be marked as
-// background. Background processes that are perceivable due to playing
-// media are given a longer grace period to accomodate changing tracks, etc.
-pref("dom.ipc.processPriorityManager.enabled", true);
-pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
-pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000);
-pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);
-
-// Number of different background/foreground levels for background/foreground
-// processes.  We use these different levels to force the low-memory killer to
-// kill processes in a LRU order.
-pref("dom.ipc.processPriorityManager.BACKGROUND.LRUPoolLevels", 5);
-pref("dom.ipc.processPriorityManager.BACKGROUND_PERCEIVABLE.LRUPoolLevels", 4);
-
-// Kernel parameters for process priorities.  These affect how processes are
-// killed on low-memory and their relative CPU priorities.
-//
-// The kernel can only accept 6 (OomScoreAdjust, KillUnderKB) pairs. But it is
-// okay, kernel will still kill processes with larger OomScoreAdjust first even
-// its OomScoreAdjust don't have a corresponding KillUnderKB.
-
-pref("hal.processPriorityManager.gonk.MASTER.OomScoreAdjust", 0);
-pref("hal.processPriorityManager.gonk.MASTER.KillUnderKB", 4096);
-pref("hal.processPriorityManager.gonk.MASTER.cgroup", "");
-
-pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.OomScoreAdjust", 67);
-pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.KillUnderKB", 5120);
-pref("hal.processPriorityManager.gonk.FOREGROUND_HIGH.cgroup", "apps/critical");
-
-pref("hal.processPriorityManager.gonk.FOREGROUND.OomScoreAdjust", 134);
-pref("hal.processPriorityManager.gonk.FOREGROUND.KillUnderKB", 6144);
-pref("hal.processPriorityManager.gonk.FOREGROUND.cgroup", "apps");
-
-pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.OomScoreAdjust", 200);
-pref("hal.processPriorityManager.gonk.FOREGROUND_KEYBOARD.cgroup", "apps");
-
-pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.OomScoreAdjust", 400);
-pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.KillUnderKB", 8192);
-pref("hal.processPriorityManager.gonk.BACKGROUND_PERCEIVABLE.cgroup", "apps/bg_perceivable");
-
-pref("hal.processPriorityManager.gonk.BACKGROUND.OomScoreAdjust", 667);
-pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderKB", 20480);
-pref("hal.processPriorityManager.gonk.BACKGROUND.cgroup", "apps/bg_non_interactive");
-
-// Control group definitions (i.e., CPU priority groups) for B2G processes.
-//
-// memory_swappiness -   0 - The kernel will swap only to avoid an out of memory condition
-// memory_swappiness -  60 - The default value.
-// memory_swappiness - 100 - The kernel will swap aggressively.
-
-// Foreground apps
-pref("hal.processPriorityManager.gonk.cgroups.apps.cpu_shares", 1024);
-pref("hal.processPriorityManager.gonk.cgroups.apps.cpu_notify_on_migrate", 0);
-pref("hal.processPriorityManager.gonk.cgroups.apps.memory_swappiness", 10);
-
-// Foreground apps with high priority, 16x more CPU than foreground ones
-pref("hal.processPriorityManager.gonk.cgroups.apps/critical.cpu_shares", 16384);
-pref("hal.processPriorityManager.gonk.cgroups.apps/critical.cpu_notify_on_migrate", 0);
-pref("hal.processPriorityManager.gonk.cgroups.apps/critical.memory_swappiness", 0);
-
-// Background perceivable apps, ~10x less CPU than foreground ones
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_perceivable.cpu_shares", 103);
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_perceivable.cpu_notify_on_migrate", 0);
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_perceivable.memory_swappiness", 60);
-
-// Background apps, ~20x less CPU than foreground ones and ~2x less than perceivable ones
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_non_interactive.cpu_shares", 52);
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_non_interactive.cpu_notify_on_migrate", 0);
-pref("hal.processPriorityManager.gonk.cgroups.apps/bg_non_interactive.memory_swappiness", 100);
-
-// By default the compositor thread on gonk runs without real-time priority.  RT
-// priority can be enabled by setting this pref to a value between 1 and 99.
-// Note that audio processing currently runs at RT priority 2 or 3 at most.
-//
-// If RT priority is disabled, then the compositor nice value is used. We prefer
-// to use a nice value of -4, which matches Android's preferences. Setting a preference
-// of RT priority 1 would mean it is higher than audio, which is -16. The compositor
-// priority must be below the audio thread.
-//
-// Do not change these values without gfx team review.
-pref("hal.gonk.COMPOSITOR.rt_priority", 0);
-pref("hal.gonk.COMPOSITOR.nice", -4);
-
-// Fire a memory pressure event when the system has less than Xmb of memory
-// remaining.  You should probably set this just above Y.KillUnderKB for
-// the highest priority class Y that you want to make an effort to keep alive.
-// (For example, we want BACKGROUND_PERCEIVABLE to stay alive.)  If you set
-// this too high, then we'll send out a memory pressure event every Z seconds
-// (see below), even while we have processes that we would happily kill in
-// order to free up memory.
-pref("gonk.notifyHardLowMemUnderKB", 14336);
-
-// Fire a memory pressure event when the system has less than Xmb of memory
-// remaining and then switch to the hard trigger, see above.  This should be
-// placed above the BACKGROUND priority class.
-pref("gonk.notifySoftLowMemUnderKB", 43008);
-
-// We wait this long before polling the memory-pressure fd after seeing one
-// memory pressure event.  (When we're not under memory pressure, we sit
-// blocked on a poll(), and this pref has no effect.)
-pref("gonk.systemMemoryPressureRecoveryPollMS", 5000);
-
-pref("dom.ipc.reuse_parent_app", false);
-
-// When a process receives a system message, we hold a CPU wake lock on its
-// behalf for this many seconds, or until it handles the system message,
-// whichever comes first.
-pref("dom.ipc.systemMessageCPULockTimeoutSec", 30);
-
-// Ignore the "dialog=1" feature in window.open.
-pref("dom.disable_window_open_dialog_feature", true);
-
-// Screen reader support
-pref("accessibility.accessfu.activate", 2);
-pref("accessibility.accessfu.quicknav_modes", "Link,Heading,FormElement,Landmark,ListItem");
-// Active quicknav mode, index value of list from quicknav_modes
-pref("accessibility.accessfu.quicknav_index", 0);
-// Setting for an utterance order (0 - description first, 1 - description last).
-pref("accessibility.accessfu.utterance", 1);
-// Whether to skip images with empty alt text
-pref("accessibility.accessfu.skip_empty_images", true);
-// Setting to change the verbosity of entered text (0 - none, 1 - characters,
-// 2 - words, 3 - both)
-pref("accessibility.accessfu.keyboard_echo", 3);
-
-// Enable hit-target fluffing
-pref("ui.touch.radius.enabled", true);
-pref("ui.touch.radius.leftmm", 3);
-pref("ui.touch.radius.topmm", 5);
-pref("ui.touch.radius.rightmm", 3);
-pref("ui.touch.radius.bottommm", 2);
-
-pref("ui.mouse.radius.enabled", true);
-pref("ui.mouse.radius.leftmm", 3);
-pref("ui.mouse.radius.topmm", 5);
-pref("ui.mouse.radius.rightmm", 3);
-pref("ui.mouse.radius.bottommm", 2);
-
-// Disable native prompt
-pref("browser.prompt.allowNative", false);
-
-// Minimum delay in milliseconds between network activity notifications (0 means
-// no notifications). The delay is the same for both download and upload, though
-// they are handled separately. This pref is only read once at startup:
-// a restart is required to enable a new value.
-pref("network.activity.blipIntervalMilliseconds", 250);
-
-// By default we want the NetworkManager service to manage Gecko's offline
-// status for us according to the state of Wifi/cellular data connections.
-// In some environments, such as the emulator or hardware with other network
-// connectivity, this is not desireable, however, in which case this pref
-// can be flipped to false.
-pref("network.gonk.manage-offline-status", true);
-
-// On Firefox Mulet, we can't enable shared JSM scope
-// as it breaks most Firefox JSMs (see bug 961777)
-#ifndef MOZ_MULET
-// Break any JSMs or JS components that rely on shared scope
-#ifndef DEBUG
-pref("jsloader.reuseGlobal", true);
-#endif
-#endif
-
-// Enable font inflation for browser tab content.
-pref("font.size.inflation.minTwips", 120);
-// And disable it for lingering master-process UI.
-pref("font.size.inflation.disabledInMasterProcess", true);
-
-// Enable freeing dirty pages when minimizing memory; this reduces memory
-// consumption when applications are sent to the background.
-pref("memory.free_dirty_pages", true);
-
-// Enable the Linux-specific, system-wide memory reporter.
-pref("memory.system_memory_reporter", true);
-
-// Don't dump memory reports on OOM, by default.
-pref("memory.dump_reports_on_oom", false);
-
-pref("layout.framevisibility.numscrollportwidths", 1);
-pref("layout.framevisibility.numscrollportheights", 1);
-
-// Wait up to this much milliseconds when orientation changed
-pref("layers.orientation.sync.timeout", 1000);
-
-// Animate the orientation change
-pref("b2g.orientation.animate", true);
-
-// Don't discard WebGL contexts for foreground apps on memory
-// pressure.
-pref("webgl.can-lose-context-in-foreground", false);
-
-// Allow nsMemoryInfoDumper to create a fifo in the temp directory.  We use
-// this fifo to trigger about:memory dumps, among other things.
-pref("memory_info_dumper.watch_fifo.enabled", true);
-pref("memory_info_dumper.watch_fifo.directory", "/data/local");
-
-// See ua-update.json.in for the packaged UA override list
-pref("general.useragent.updates.enabled", true);
-pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%");
-pref("general.useragent.updates.interval", 604800); // 1 week
-pref("general.useragent.updates.retry", 86400); // 1 day
-// Device ID can be composed of letter, numbers, hyphen ("-") and dot (".")
-pref("general.useragent.device_id", "");
-
-// Add Mozilla AudioChannel APIs.
-pref("media.useAudioChannelAPI", true);
-
-pref("b2g.version", @MOZ_B2G_VERSION@);
-pref("b2g.osName", @MOZ_B2G_OS_NAME@);
-
-// Disable console buffering to save memory.
-pref("consoleservice.buffered", false);
-
-#ifdef MOZ_WIDGET_GONK
-// Performance testing suggests 2k is a better page size for SQLite.
-pref("toolkit.storage.pageSize", 2048);
-#endif
-
-// The url of the manifest we use for ADU pings.
-pref("ping.manifestURL", "https://marketplace.firefox.com/packaged.webapp");
-
-// Enable the disk space watcher
-pref("disk_space_watcher.enabled", true);
-
-// SNTP preferences.
-pref("network.sntp.maxRetryCount", 10);
-pref("network.sntp.refreshPeriod", 86400); // In seconds.
-pref("network.sntp.pools", // Servers separated by ';'.
-     "0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org;3.pool.ntp.org");
-pref("network.sntp.port", 123);
-pref("network.sntp.timeout", 30); // In seconds.
-
-// Allow ADB to run for this many hours before disabling.
-// 0 disables the timer.
-pref("b2g.adb.timeout-hours", 12);
-
-// Absolute path to the devtool unix domain socket file used
-// to communicate with a usb cable via adb forward
-pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket");
-
-// enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases,
-// falling back to Skia/software for smaller canvases
-#ifdef MOZ_WIDGET_GONK
-pref("gfx.canvas.azure.backends", "skia");
-pref("gfx.canvas.azure.accelerated", true);
-#endif
-
-// Turn on dynamic cache size for Skia
-pref("gfx.canvas.skiagl.dynamic-cache", true);
-
-// Limit skia to canvases the size of the device screen or smaller
-pref("gfx.canvas.max-size-for-skia-gl", -1);
-
-// enable fence with readpixels for SurfaceStream
-pref("gfx.gralloc.fence-with-readpixels", true);
-
-// enable screen mirroring to external display
-pref("gfx.screen-mirroring.enabled", true);
-
-// The url of the page used to display network error details.
-pref("b2g.neterror.url", "net_error.html");
-
-// Enable Web Speech synthesis API
-pref("media.webspeech.synth.enabled", true);
-
-// Enable Web Speech recognition API
-pref("media.webspeech.recognition.enable", true);
-
-// External Helper Application Handling
-//
-// All external helper application handling can require the docshell to be
-// active before allowing the external helper app service to handle content.
-//
-// To prevent SD card DoS attacks via downloads we disable background handling.
-//
-pref("security.exthelperapp.disable_background_handling", true);
-
-// Inactivity time in milliseconds after which we shut down the OS.File worker.
-pref("osfile.reset_worker_delay", 5000);
-
-// APZ physics settings, tuned by UX designers
-pref("apz.axis_lock.mode", 2); // Use "sticky" axis locking
-pref("apz.fling_curve_function_x1", "0.41");
-pref("apz.fling_curve_function_y1", "0.0");
-pref("apz.fling_curve_function_x2", "0.80");
-pref("apz.fling_curve_function_y2", "1.0");
-pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
-pref("apz.fling_friction", "0.0019");
-pref("apz.max_velocity_inches_per_ms", "0.07");
-pref("apz.overscroll.enabled", true);
-pref("apz.displayport_expiry_ms", 0); // causes issues on B2G, see bug 1250924
-
-// For event-regions based hit-testing
-pref("layout.event-regions.enabled", true);
-
-// This preference allows FirefoxOS apps (and content, I think) to force
-// the use of software (instead of hardware accelerated) 2D canvases by
-// creating a context like this:
-//
-//   canvas.getContext('2d', { willReadFrequently: true })
-//
-// Using a software canvas can save memory when JS calls getImageData()
-// on the canvas frequently. See bug 884226.
-pref("gfx.canvas.willReadFrequently.enable", true);
-
-// Disable autofocus until we can have it not bring up the keyboard.
-// https://bugzilla.mozilla.org/show_bug.cgi?id=965763
-pref("browser.autofocus", false);
-
-// Enable wakelock
-pref("dom.wakelock.enabled", true);
-
-// Enable webapps add-ons
-pref("dom.apps.reviewer_paths", "/reviewers/,/extension/reviewers/");
-
-// New implementation to unify touch-caret and selection-carets.
-pref("layout.accessiblecaret.enabled", true);
-
-// Show the selection bars at the two ends of the selection highlight. Required
-// by the spec in bug 921965.
-pref("layout.accessiblecaret.bar.enabled", true);
-
-// Hide carets and text selection dialog during scrolling.
-pref("layout.accessiblecaret.always_show_when_scrolling", false);
-
-// Enable sync with Firefox Accounts.
-pref("services.sync.fxaccounts.enabled", true);
-pref("identity.fxaccounts.enabled", true);
-
-pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.accounts.firefox.com/v1");
-pref("identity.fxaccounts.remote.profile.uri", "https://profile.accounts.firefox.com/v1");
-
-// Disable Firefox Accounts device registration until bug 1238895 is fixed.
-pref("identity.fxaccounts.skipDeviceRegistration", true);
-
-// Enable mapped array buffer.
-pref("dom.mapped_arraybuffer.enabled", true);
-
-// UDPSocket API
-pref("dom.udpsocket.enabled", true);
-
-// Comma separated list of activity names that can only be provided by
-// the system app in dev mode.
-pref("dom.activities.developer_mode_only", "import-app");
-
-// mulet apparently loads firefox.js as well as b2g.js, so we have to explicitly
-// disable serviceworkers and push here to get them disabled in mulet.
-pref("dom.serviceWorkers.enabled", false);
-pref("dom.push.enabled", false);
-
-#if defined(RELEASE_OR_BETA)
-// Bug 1278848: Enable service worker notifications on release B2G once
-// they're ready.
-pref("dom.webnotifications.serviceworker.enabled", false);
-#else
-pref("dom.webnotifications.serviceworker.enabled", true);
-#endif
-
-// Retain at most 10 processes' layers buffers
-pref("layers.compositor-lru-size", 10);
-
-// In B2G by deafult any AudioChannelAgent is muted when created.
-pref("dom.audiochannel.mutedByDefault", true);
-
-// Default device name for Presentation API
-pref("dom.presentation.device.name", "Firefox OS");
-
-// Enable notification of performance timing
-pref("dom.performance.enable_notify_performance_timing", true);
-
-// Multi-screen
-pref("b2g.multiscreen.chrome_remote_url", "chrome://b2g/content/shell_remote.html");
-pref("b2g.multiscreen.system_remote_url", "index_remote.html");
-
-// Audio competing between tabs
-pref("dom.audiochannel.audioCompeting", false);
-
-// Because we can't have nice things.
-#ifdef MOZ_GRAPHENE
-#include ../graphene/graphene.js
-#endif
deleted file mode 100644
--- a/b2g/app/macbuild/Contents/Info.plist.in
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>%APP_BINARY%</string>
-	<key>CFBundleGetInfoString</key>
-	<string>%APP_NAME% %APP_VERSION%</string>
-	<key>CFBundleIconFile</key>
-	<string>%MOZ_APP_NAME%.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.mozilla.b2g</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>%MOZ_APP_VERSION%</string>
-	<key>CFBundleName</key>
-	<string>%APP_NAME%</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>%APP_VERSION%</string>
-	<key>CFBundleSignature</key>
-	<string>MOZB</string>
-	<key>CFBundleVersion</key>
-	<string>%APP_VERSION%</string>
-	<key>NSAppleScriptEnabled</key>
-	<true/>
-	<key>CGDisableCoalescedUpdates</key>
-	<true/>
-	<key>NSHighResolutionCapable</key>
-	<true/>
-	<key>NSPrincipalClass</key>
-	<string>GeckoNSApplication</string>
-	<key>CFBundleURLTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleURLIconFile</key>
-			<string>document.icns</string>
-			<key>CFBundleURLName</key>
-			<string>http URL</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>http</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleURLIconFile</key>
-			<string>document.icns</string>
-			<key>CFBundleURLName</key>
-			<string>https URL</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>https</string>
-			</array>
-		</dict>
-		<dict>
-			<key>CFBundleURLName</key>
-			<string>ftp URL</string>
-			<key>CFBundleURLSchemes</key>
-			<array>
-				<string>ftp</string>
-			</array>
-		</dict>
-	</array>
-</dict>
-</plist>
deleted file mode 100644
--- a/b2g/app/macbuild/Contents/MacOS-files.in
+++ /dev/null
@@ -1,9 +0,0 @@
-/*.app/***
-/*.dylib
-/b2g
-/certutil
-/gtest/***
-/pk12util
-/ssltunnel
-/xpcshell
-/XUL
deleted file mode 100644
--- a/b2g/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
+++ /dev/null
@@ -1,5 +0,0 @@
-/* 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/. */
-
-CFBundleName = "%APP_NAME%";
deleted file mode 100644
--- a/b2g/app/moz.build
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-if CONFIG['GAIADIR']:
-    GeckoProgram(CONFIG['MOZ_APP_NAME'] + "-bin")
-else:
-    GeckoProgram(CONFIG['MOZ_APP_NAME'])
-
-SOURCES += [
-    'nsBrowserApp.cpp',
-]
-if CONFIG['_MSC_VER']:
-    # Always enter a Windows program through wmain, whether or not we're
-    # a console application.
-    WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
-
-USE_LIBS += [
-    'zlib',
-]
-
-for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
-    DEFINES[var] = CONFIG[var]
-
-LOCAL_INCLUDES += [
-    '!/build',
-    '/toolkit/xre',
-    '/xpcom/base',
-    '/xpcom/build',
-]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
-    LOCAL_INCLUDES += [
-        '/widget/gonk/libdisplay',
-    ]
-
-    LDFLAGS += ['-Wl,--export-dynamic']
-
-    USE_LIBS += [
-        'display',
-        'mozpng',
-    ]
-    OS_LIBS += [
-        'ui',
-        'EGL',
-        'hardware_legacy',
-        'hardware',
-        'cutils',
-    ]
-    OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
-    if CONFIG['ANDROID_VERSION'] in ('17', '18', '19', '21', '22'):
-        OS_LIBS += [
-            'gui',
-            'suspend',
-        ]
-    OS_LIBS += [
-        'binder',
-        'utils',
-    ]
-
-DISABLE_STL_WRAPPING = True
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    OS_LIBS += [
-        'version',
-    ]
-
-JS_PREFERENCE_PP_FILES += [
-    'b2g.js',
-]
-
-FINAL_TARGET_PP_FILES += [
-  'ua-update.json.in',
-]
deleted file mode 100644
--- a/b2g/app/nsBrowserApp.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#include "nsXULAppAPI.h"
-#include "application.ini.h"
-#include "nsXPCOMGlue.h"
-#if defined(XP_WIN)
-#include <windows.h>
-#include <stdlib.h>
-#elif defined(XP_UNIX)
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <unistd.h>
-#endif
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "nsCOMPtr.h"
-#include "nsIFile.h"
-#include "nsStringGlue.h"
-
-#ifdef XP_WIN
-// we want a wmain entry point
-#include "nsWindowsWMain.cpp"
-#define strcasecmp _stricmp
-#endif
-
-#ifdef MOZ_WIDGET_GONK
-#include "BootAnimation.h"
-#endif
-
-#include "BinaryPath.h"
-
-#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
-
-#ifdef MOZ_WIDGET_GONK
-# include <binder/ProcessState.h>
-#endif
-
-#include "mozilla/Sprintf.h"
-#include "mozilla/Telemetry.h"
-#include "mozilla/WindowsDllBlocklist.h"
-
-static void Output(const char *fmt, ... )
-{
-  va_list ap;
-  va_start(ap, fmt);
-
-#if defined(XP_WIN) && !MOZ_WINCONSOLE
-  wchar_t msg[2048];
-  _vsnwprintf(msg, sizeof(msg)/sizeof(msg[0]), NS_ConvertUTF8toUTF16(fmt).get(), ap);
-  MessageBoxW(nullptr, msg, L"XULRunner", MB_OK | MB_ICONERROR);
-#else
-  vfprintf(stderr, fmt, ap);
-#endif
-
-  va_end(ap);
-}
-
-/**
- * Return true if |arg| matches the given argument name.
- */
-static bool IsArg(const char* arg, const char* s)
-{
-  if (*arg == '-')
-  {
-    if (*++arg == '-')
-      ++arg;
-    return !strcasecmp(arg, s);
-  }
-
-#if defined(XP_WIN)
-  if (*arg == '/')
-    return !strcasecmp(++arg, s);
-#endif
-
-  return false;
-}
-
-XRE_GetFileFromPathType XRE_GetFileFromPath;
-XRE_CreateAppDataType XRE_CreateAppData;
-XRE_FreeAppDataType XRE_FreeAppData;
-XRE_TelemetryAccumulateType XRE_TelemetryAccumulate;
-XRE_mainType XRE_main;
-
-static const nsDynamicFunctionLoad kXULFuncs[] = {
-    { "XRE_GetFileFromPath", (NSFuncPtr*) &XRE_GetFileFromPath },
-    { "XRE_CreateAppData", (NSFuncPtr*) &XRE_CreateAppData },
-    { "XRE_FreeAppData", (NSFuncPtr*) &XRE_FreeAppData },
-    { "XRE_TelemetryAccumulate", (NSFuncPtr*) &XRE_TelemetryAccumulate },
-    { "XRE_main", (NSFuncPtr*) &XRE_main },
-    { nullptr, nullptr }
-};
-
-static int do_main(int argc, char* argv[])
-{
-  nsCOMPtr<nsIFile> appini;
-  nsresult rv;
-
-  // Allow firefox.exe to launch XULRunner apps via -app <application.ini>
-  // Note that -app must be the *first* argument.
-  const char *appDataFile = getenv("XUL_APP_FILE");
-  if (appDataFile && *appDataFile) {
-    rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
-    if (NS_FAILED(rv)) {
-      Output("Invalid path found: '%s'", appDataFile);
-      return 255;
-    }
-  }
-  else if (argc > 1 && IsArg(argv[1], "app")) {
-    if (argc == 2) {
-      Output("Incorrect number of arguments passed to -app");
-      return 255;
-    }
-
-    rv = XRE_GetFileFromPath(argv[2], getter_AddRefs(appini));
-    if (NS_FAILED(rv)) {
-      Output("application.ini path not recognized: '%s'", argv[2]);
-      return 255;
-    }
-
-    char appEnv[MAXPATHLEN];
-    SprintfLiteral(appEnv, "XUL_APP_FILE=%s", argv[2]);
-    if (putenv(strdup(appEnv))) {
-      Output("Couldn't set %s.\n", appEnv);
-      return 255;
-    }
-    argv[2] = argv[0];
-    argv += 2;
-    argc -= 2;
-  }
-
-#ifdef MOZ_WIDGET_GONK
-  /* Start boot animation */
-  mozilla::StartBootAnimation();
-#endif
-
-  if (appini) {
-    nsXREAppData *appData;
-    rv = XRE_CreateAppData(appini, &appData);
-    if (NS_FAILED(rv)) {
-      Output("Couldn't read application.ini");
-      return 255;
-    }
-    int result = XRE_main(argc, argv, appData);
-    XRE_FreeAppData(appData);
-    return result;
-  }
-
-  return XRE_main(argc, argv, &sAppData);
-}
-
-int main(int argc, char* argv[])
-{
-  char exePath[MAXPATHLEN];
-
-#ifdef MOZ_WIDGET_GONK
-  // This creates a ThreadPool for binder ipc. A ThreadPool is necessary to
-  // receive binder calls, though not necessary to send binder calls.
-  // ProcessState::Self() also needs to be called once on the main thread to
-  // register the main thread with the binder driver.
-  android::ProcessState::self()->startThreadPool();
-#endif
-
-  nsresult rv;
-  rv = mozilla::BinaryPath::Get(argv[0], exePath);
-  if (NS_FAILED(rv)) {
-    Output("Couldn't calculate the application directory.\n");
-    return 255;
-  }
-
-  char *lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]);
-  if (!lastSlash || ((lastSlash - exePath) + sizeof(XPCOM_DLL) + 1 > MAXPATHLEN))
-    return 255;
-
-  strcpy(++lastSlash, XPCOM_DLL);
-
-#if defined(XP_UNIX)
-  // If the b2g app is launched from adb shell, then the shell will wind
-  // up being the process group controller. This means that we can't send
-  // signals to the process group (useful for profiling).
-  // We ignore the return value since setsid() fails if we're already the
-  // process group controller (the normal situation).
-  (void)setsid();
-#endif
-
-#ifdef HAS_DLL_BLOCKLIST
-  DllBlocklist_Initialize();
-#endif
-
-  rv = XPCOMGlueStartup(exePath);
-  if (NS_FAILED(rv)) {
-    Output("Couldn't load XPCOM.\n");
-    return 255;
-  }
-  // Reset exePath so that it is the directory name and not the xpcom dll name
-  *lastSlash = 0;
-
-  rv = XPCOMGlueLoadXULFunctions(kXULFuncs);
-  if (NS_FAILED(rv)) {
-    Output("Couldn't load XRE functions.\n");
-    return 255;
-  }
-
-  int result;
-  {
-    ScopedLogging log;
-    char **_argv;
-
-    /*
-     * Duplicate argument vector to conform non-const argv of
-     * do_main() since XRE_main() is very stupid with non-const argv.
-     */
-    _argv = new char *[argc + 1];
-    for (int i = 0; i < argc; i++) {
-      size_t len = strlen(argv[i]) + 1;
-      _argv[i] = new char[len];
-      MOZ_ASSERT(_argv[i] != nullptr);
-      memcpy(_argv[i], argv[i], len);
-    }
-    _argv[argc] = nullptr;
-
-    result = do_main(argc, _argv);
-
-    for (int i = 0; i < argc; i++) {
-      delete[] _argv[i];
-    }
-    delete[] _argv;
-  }
-
-  return result;
-}
deleted file mode 100644
--- a/b2g/app/ua-update.json.in
+++ /dev/null
@@ -1,51 +0,0 @@
-#filter slashslash
-// Everything after the first // on a line will be removed by the preproccesor.
-// Send these sites a custom user-agent. Bugs should be included with an entry.
-{
-  // bug 826347, msn.com
-  "msn.com": "\\(Mobile#(Android 4.4.4; Mobile",
-  // bug 826353, itau.com.br
-  "itau.com.br": "\\(Mobile#(Android; Mobile",
-  // bug 826510, r7.com
-  "r7.com": "\\(Mobile#(Android; Mobile",
-  // bug 827622, bing.com
-  "bing.com": "\\(Mobile#(Android; Mobile",
-  // bug 827626, magazineluiza.com.br
-  "magazineluiza.com.br": "\\(Mobile#(Android; Mobile",
-  // bug 827670, elpais.com.co
-  "elpais.com.co": "\\(Mobile#(Android 4.4.4; Mobile",
-  // bug 828416, loteriasyapuestas.es
-  "loteriasyapuestas.es": "\\(Mobile#(Android; Mobile",
-  // bug 828418, bbva.es
-  "bbva.es": "\\(Mobile#(Android; Mobile",
-  // bug 828439, movistar.com.ve
-  "movistar.com.ve": "\\(Mobile#(Android; Mobile",
-  // bug 843132, comunio.es
-  "comunio.es": "\\(Mobile#(Android; Mobile",
-  // bug 843151, citibank.com
-  "citibank.com": "\\(Mobile#(Android; Mobile",
-  // bug 843153, games.com
-  "games.com": "\\(Mobile#(Android; Mobile",
-  // bug 843160, ehow.com
-  "ehow.com": "\\(Mobile#(Android; Mobile",
-  // bug 878228, blikk.hu
-  "blikk.hu": "\\(Mobile#(Android; Mobile",
-  // bug 878238, koponyeg.hu
-  "koponyeg.hu": "\\(Mobile#(Android; Mobile",
-  // bug 878240, kuruc.info
-  "kuruc.info": "\\(Mobile#(Android; Mobile",
-  // bug 878242, nemzetisport.hu
-  "nemzetisport.hu": "\\(Mobile#(Android; Mobile",
-  // bug 878246, port.hu
-  "port.hu": "\\(Mobile#(Android; Mobile",
-  // bug 878249, portfolio.hu
-  "portfolio.hu": "\\(Mobile#(Android; Mobile",
-  // bug 878260, cdm.me
-  "cdm.me": "\\(Mobile#(Android; Mobile",
-  // bug 878262, download.com
-  "download.com": "\\(Mobile#(Android; Mobile",
-  // bug 878273, livescore.com
-  "livescore.com": "\\(Mobile#(Android; Mobile",
-  // bug 878653, redstarbelgrade.info
-  "redstarbelgrade.info": "\\(Mobile#(Android; Mobile"
-}
deleted file mode 100644
--- a/b2g/branding/branding-common.mozbuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-@template
-def B2GBranding():
-    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-        BRANDING_FILES += [
-            'app.ico',
-        ]
-    elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-        BRANDING_FILES += [
-            'app.icns',
-            'background.png',
-            'disk.icns',
-            'dsstore',
-        ]
-    elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
-        BRANDING_FILES += [
-            'default.png',
-        ]
deleted file mode 100644
index 3d680134e260a2a0e44cb809104162ebe59e8058..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 04596e4d0602ce6872473f357dc6292831ef10c1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index db5576a3360ee328013b62428bbc93b5f5fa4722..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/browserhtml/configure.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# 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/.
-
-MOZ_APP_DISPLAYNAME=Browser.html
deleted file mode 100644
index 3cc1444f645b1a36a885816ffd6caa799482ea7a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ac4a6968bf2746ad89a82d85df3a8679b5530cca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b7513c2e4689ae656c99a0e79ae266a5931594e3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c8bee8fca98d4e57315f1198594ff31d48caefad..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/browserhtml/content/jar.mn
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-chrome.jar:
-% content branding %content/branding/ contentaccessible=yes
-  content/branding/about.png                     (about.png)
-  content/branding/logoWordmark.png              (logoWordmark.png)
-  content/branding/logo.png                      (logo.png)
-  content/branding/favicon32.png                 (favicon32.png)
deleted file mode 100644
index 9d9d0c57e030717c7fd59beaaa4a9b6d9a913b7d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 878363181ace30dda780d211d8c3ee54153dbc84..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/browserhtml/content/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
index 84ab581d20e557e9189a59f2de64ad889e727cf0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ae4736223a852e8d4aea71f72d23b7531a1950fc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c49b7b878e417b076f2b9b61eb398e8fe1d56a2e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 657101d6e220315df695f721f6c635d0fa3e2079..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/browserhtml/locales/en-US/brand.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<!-- 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/. -->
-
-<!ENTITY  brandShortName  "Browser.html">
-<!ENTITY  brandFullName   "Mozilla Browser.html">
-<!ENTITY  vendorShortName "Mozilla">
deleted file mode 100644
--- a/b2g/branding/browserhtml/locales/en-US/brand.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-brandShortName=Browser.html
-brandFullName=Mozilla Browser.html
deleted file mode 100644
--- a/b2g/branding/browserhtml/locales/jar.mn
+++ /dev/null
@@ -1,11 +0,0 @@
-#filter substitution
-# 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/.
-
-
-@AB_CD@.jar:
-% locale branding @AB_CD@ %locale/branding/
-# Branding only exists in en-US
-  locale/branding/brand.dtd        (en-US/brand.dtd)
-  locale/branding/brand.properties (en-US/brand.properties)
deleted file mode 100644
--- a/b2g/branding/browserhtml/locales/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
--- a/b2g/branding/browserhtml/moz.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['content', 'locales']
-
-include('../branding-common.mozbuild')
-B2GBranding()
deleted file mode 100644
index 6c7b9f5b500eb933235ca0d08970acab7ab3e09d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 49eb9041923418cf92c87bda28f1ef9ab7c5908d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index db5576a3360ee328013b62428bbc93b5f5fa4722..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/horizon/configure.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-# 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/.
-
-MOZ_APP_DISPLAYNAME=Horizon
deleted file mode 100644
index 3cc1444f645b1a36a885816ffd6caa799482ea7a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ac4a6968bf2746ad89a82d85df3a8679b5530cca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b7513c2e4689ae656c99a0e79ae266a5931594e3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c8bee8fca98d4e57315f1198594ff31d48caefad..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/horizon/content/jar.mn
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-chrome.jar:
-% content branding %content/branding/ contentaccessible=yes
-  content/branding/about.png                     (about.png)
-  content/branding/logoWordmark.png              (logoWordmark.png)
-  content/branding/logo.png                      (logo.png)
-  content/branding/favicon32.png                 (favicon32.png)
deleted file mode 100644
index 9d9d0c57e030717c7fd59beaaa4a9b6d9a913b7d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 878363181ace30dda780d211d8c3ee54153dbc84..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/horizon/content/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
index 84ab581d20e557e9189a59f2de64ad889e727cf0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 0e6a4016ca526645be825b0c41359490c5c45f71..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c49b7b878e417b076f2b9b61eb398e8fe1d56a2e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 657101d6e220315df695f721f6c635d0fa3e2079..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/horizon/locales/en-US/brand.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- 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/. -->
-
-<!ENTITY  brandShortName  "Horizon">
-<!ENTITY  brandFullName   "Mozilla Horizon">
-<!ENTITY  vendorShortName "Mozilla">
-<!ENTITY  logoTrademark   "Horizon and the Horizon logos are trademarks of the Mozilla Foundation.">
deleted file mode 100644
--- a/b2g/branding/horizon/locales/en-US/brand.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-brandShortName=Horizon
-brandFullName=Mozilla Horizon
deleted file mode 100644
--- a/b2g/branding/horizon/locales/jar.mn
+++ /dev/null
@@ -1,11 +0,0 @@
-#filter substitution
-# 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/.
-
-
-@AB_CD@.jar:
-% locale branding @AB_CD@ %locale/branding/
-# Branding only exists in en-US
-  locale/branding/brand.dtd        (en-US/brand.dtd)
-  locale/branding/brand.properties (en-US/brand.properties)
deleted file mode 100644
--- a/b2g/branding/horizon/locales/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
--- a/b2g/branding/horizon/moz.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['content', 'locales']
-
-include('../branding-common.mozbuild')
-B2GBranding()
deleted file mode 100644
index eba850aaee10662fa3bc796ac97ec59e4c3b5df8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 5d4a61dc92ba5b08b2ff0587fb2877e7007c940e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index db5576a3360ee328013b62428bbc93b5f5fa4722..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/official/configure.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-MOZ_APP_DISPLAYNAME=B2G
-MOZ_UPDATER=
deleted file mode 100644
index 3cc1444f645b1a36a885816ffd6caa799482ea7a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ac4a6968bf2746ad89a82d85df3a8679b5530cca..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b7513c2e4689ae656c99a0e79ae266a5931594e3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c8bee8fca98d4e57315f1198594ff31d48caefad..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/official/content/jar.mn
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-chrome.jar:
-% content branding %content/branding/ contentaccessible=yes
-  content/branding/about.png                     (about.png)
-  content/branding/logoWordmark.png              (logoWordmark.png)
-  content/branding/logo.png                      (logo.png)
-  content/branding/favicon32.png                 (favicon32.png)
deleted file mode 100644
index 9d9d0c57e030717c7fd59beaaa4a9b6d9a913b7d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 878363181ace30dda780d211d8c3ee54153dbc84..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/official/content/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
index 84ab581d20e557e9189a59f2de64ad889e727cf0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c4307fc8418436bb6b2fd3a6afc702c2db28aa77..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c49b7b878e417b076f2b9b61eb398e8fe1d56a2e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 657101d6e220315df695f721f6c635d0fa3e2079..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/official/locales/en-US/brand.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- 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/. -->
-
-<!ENTITY  brandShortName  "Firefox">
-<!ENTITY  brandFullName   "Mozilla Firefox">
-<!ENTITY  vendorShortName "Mozilla">
-<!ENTITY  logoTrademark   "Firefox and the Firefox logos are trademarks of the Mozilla Foundation.">
deleted file mode 100644
--- a/b2g/branding/official/locales/en-US/brand.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-brandShortName=Firefox
-brandFullName=Mozilla Firefox
deleted file mode 100644
--- a/b2g/branding/official/locales/jar.mn
+++ /dev/null
@@ -1,11 +0,0 @@
-#filter substitution
-# 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/.
-
-
-@AB_CD@.jar:
-% locale branding @AB_CD@ %locale/branding/
-# Branding only exists in en-US
-  locale/branding/brand.dtd        (en-US/brand.dtd)
-  locale/branding/brand.properties (en-US/brand.properties)
deleted file mode 100644
--- a/b2g/branding/official/locales/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
--- a/b2g/branding/official/moz.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['content', 'locales']
-
-include('../branding-common.mozbuild')
-B2GBranding()
deleted file mode 100644
index eba850aaee10662fa3bc796ac97ec59e4c3b5df8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 5d4a61dc92ba5b08b2ff0587fb2877e7007c940e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index db5576a3360ee328013b62428bbc93b5f5fa4722..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/unofficial/configure.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-MOZ_APP_DISPLAYNAME=B2G
-MOZ_UPDATER=
deleted file mode 100644
index 3819f6337a171cf8ab8e5171bbab6f787b5f77ae..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3f04acd50d303235149c6a2822003ed94f8a51a7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 3ae248c857d7010eee72e3f20f5a8fbaeed4f196..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fe980153be29d7d4d01066de16a0fd28ae0e223c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/unofficial/content/jar.mn
+++ /dev/null
@@ -1,10 +0,0 @@
-# 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/.
-
-chrome.jar:
-% content branding %content/branding/ contentaccessible=yes
-  content/branding/about.png                     (about.png)
-  content/branding/logoWordmark.png              (logoWordmark.png)
-  content/branding/logo.png                      (logo.png)
-  content/branding/favicon32.png                 (favicon32.png)
deleted file mode 100644
index 91377a312090ce5032e4ceff60f173abc5a0da64..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index a3017f59ecf02808ee8793f118d02bd04b2bae8a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/unofficial/content/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
index 25a0830eac7003d6dec6992b18b9f17a0f27d723..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c4307fc8418436bb6b2fd3a6afc702c2db28aa77..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c49b7b878e417b076f2b9b61eb398e8fe1d56a2e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 657101d6e220315df695f721f6c635d0fa3e2079..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/branding/unofficial/locales/en-US/brand.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- 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/. -->
-
-<!ENTITY  brandShortName  "Firefox">
-<!ENTITY  brandFullName   "Mozilla Firefox">
-<!ENTITY  vendorShortName "Mozilla">
-<!ENTITY  logoTrademark   "Firefox and the Firefox logos are trademarks of the Mozilla Foundation.">
deleted file mode 100644
--- a/b2g/branding/unofficial/locales/en-US/brand.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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/.
-
-brandShortName=Firefox
-brandFullName=Mozilla Firefox
deleted file mode 100644
--- a/b2g/branding/unofficial/locales/jar.mn
+++ /dev/null
@@ -1,11 +0,0 @@
-#filter substitution
-# 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/.
-
-
-@AB_CD@.jar:
-% locale branding @AB_CD@ %locale/branding/
-# Nightly branding only exists in en-US
-  locale/branding/brand.dtd        (en-US/brand.dtd)
-  locale/branding/brand.properties (en-US/brand.properties)
deleted file mode 100644
--- a/b2g/branding/unofficial/locales/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
deleted file mode 100644
--- a/b2g/branding/unofficial/moz.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['content', 'locales']
-
-include('../branding-common.mozbuild')
-B2GBranding()
deleted file mode 100644
--- a/b2g/build.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
-
-installer: 
-	@$(MAKE) -C b2g/installer installer
-
-package:
-	@$(MAKE) -C b2g/installer
-
-install::
-	@echo 'B2G can't be installed directly.'
-	@exit 1
-
-upload::
-	@$(MAKE) -C b2g/installer upload
-
-ifdef ENABLE_TESTS
-# Implemented in testing/testsuite-targets.mk
-
-mochitest-browser-chrome:
-	$(RUN_MOCHITEST) --flavor=browser
-	$(CHECK_TEST_ERROR)
-
-mochitest:: mochitest-browser-chrome
-
-.PHONY: mochitest-browser-chrome
-endif
-
deleted file mode 100644
--- a/b2g/chrome/content/ErrorPage.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-'use strict';
-
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-dump("############ ErrorPage.js\n");
-
-var ErrorPageHandler = {
-  _reload: function() {
-    docShell.QueryInterface(Ci.nsIWebNavigation).reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
-  },
-
-  _certErrorPageEventHandler: function(e) {
-    let target = e.originalTarget;
-    let errorDoc = target.ownerDocument;
-
-    // If the event came from an ssl error page, it is one of the "Add
-    // Exception…" buttons.
-    if (/^about:certerror\?e=nssBadCert/.test(errorDoc.documentURI)) {
-      let permanent = errorDoc.getElementById("permanentExceptionButton");
-      let temp = errorDoc.getElementById("temporaryExceptionButton");
-      if (target == temp || target == permanent) {
-        sendAsyncMessage("ErrorPage:AddCertException", {
-          url: errorDoc.location.href,
-          isPermanent: target == permanent
-        });
-      }
-    }
-  },
-
-  _bindPageEvent: function(target) {
-    if (!target) {
-      return;
-    }
-
-    if (/^about:certerror/.test(target.documentURI)) {
-      let errorPageEventHandler = this._certErrorPageEventHandler.bind(this);
-      addEventListener("click", errorPageEventHandler, true, false);
-      let listener = function() {
-        removeEventListener("click", errorPageEventHandler, true);
-        removeEventListener("pagehide", listener, true);
-      }.bind(this);
-
-      addEventListener("pagehide", listener, true);
-    }
-  },
-
-  domContentLoadedHandler: function(e) {
-    let target = e.originalTarget;
-    let targetDocShell = target.defaultView
-                               .QueryInterface(Ci.nsIInterfaceRequestor)
-                               .getInterface(Ci.nsIWebNavigation);
-    if (targetDocShell != docShell) {
-      return;
-    }
-    this._bindPageEvent(target);
-  },
-
-  init: function() {
-    addMessageListener("ErrorPage:ReloadPage", this._reload.bind(this));
-    addEventListener('DOMContentLoaded',
-                     this.domContentLoadedHandler.bind(this),
-                     true);
-    this._bindPageEvent(content.document);
-  }
-};
-
-ErrorPageHandler.init();
deleted file mode 100644
--- a/b2g/chrome/content/aboutCertError.xhtml
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE html [
-  <!ENTITY % htmlDTD
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "DTD/xhtml1-strict.dtd">
-  %htmlDTD;
-  <!ENTITY % globalDTD
-    SYSTEM "chrome://global/locale/global.dtd">
-  %globalDTD;
-  <!ENTITY % certerrorDTD
-    SYSTEM "chrome://b2g-l10n/locale/aboutCertError.dtd">
-  %certerrorDTD;
-]>
-
-<!-- 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/. -->
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>&certerror.pagetitle;</title>
-    <meta name="viewport" content="width=device-width; user-scalable=false" />
-    <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
-    <!-- This page currently uses the same favicon as neterror.xhtml.
-         If the location of the favicon is changed for both pages, the
-         FAVICON_ERRORPAGE_URL symbol in toolkit/components/places/src/nsFaviconService.h
-         should be updated. If this page starts using a different favicon
-         than neterrorm nsFaviconService->SetAndLoadFaviconForPage
-         should be updated to ignore this one as well. -->
-    <link rel="icon" type="image/png" id="favicon" sizes="64x64" href="chrome://global/skin/icons/warning-64.png"/>
-
-    <script type="application/javascript"><![CDATA[
-      // Error url MUST be formatted like this:
-      //   about:certerror?e=error&u=url&d=desc
-
-      // Note that this file uses document.documentURI to get
-      // the URL (with the format from above). This is because
-      // document.location.href gets the current URI off the docshell,
-      // which is the URL displayed in the location bar, i.e.
-      // the URI that the user attempted to load.
-
-      function getCSSClass()
-      {
-        var url = document.documentURI;
-        var matches = url.match(/s\=([^&]+)\&/);
-        // s is optional, if no match just return nothing
-        if (!matches || matches.length < 2)
-          return "";
-
-        // parenthetical match is the second entry
-        return decodeURIComponent(matches[1]);
-      }
-
-      function getDescription()
-      {
-        var url = document.documentURI;
-        var desc = url.search(/d\=/);
-
-        // desc == -1 if not found; if so, return an empty string
-        // instead of what would turn out to be portions of the URI
-        if (desc == -1)
-          return "";
-
-        return decodeURIComponent(url.slice(desc + 2));
-      }
-
-      function initPage()
-      {
-        // Replace the "#1" string in the intro with the hostname.  Trickier
-        // than it might seem since we want to preserve the <b> tags, but
-        // not allow for any injection by just using innerHTML.  Instead,
-        // just find the right target text node.
-        var intro = document.getElementById('introContentP1');
-        function replaceWithHost(node) {
-          if (node.textContent == "#1")
-            node.textContent = location.host;
-          else
-            for(var i = 0; i < node.childNodes.length; i++)
-              replaceWithHost(node.childNodes[i]);
-        };
-        replaceWithHost(intro);
-
-        if (getCSSClass() == "expertBadCert") {
-          toggle('technicalContent');
-          toggle('expertContent');
-        }
-
-        var tech = document.getElementById("technicalContentText");
-        if (tech)
-          tech.textContent = getDescription();
-
-        addDomainErrorLink();
-      }
-
-      /* In the case of SSL error pages about domain mismatch, see if
-         we can hyperlink the user to the correct site.  We don't want
-         to do this generically since it allows MitM attacks to redirect
-         users to a site under attacker control, but in certain cases
-         it is safe (and helpful!) to do so.  Bug 402210
-      */
-      function addDomainErrorLink() {
-        // Rather than textContent, we need to treat description as HTML
-        var sd = document.getElementById("technicalContentText");
-        if (sd) {
-          var desc = getDescription();
-
-          // sanitize description text - see bug 441169
-
-          // First, find the index of the <a> tag we care about, being careful not to
-          // use an over-greedy regex
-          var re = /<a id="cert_domain_link" title="([^"]+)">/;
-          var result = re.exec(desc);
-          if(!result)
-            return;
-
-          // Remove sd's existing children
-          sd.textContent = "";
-
-          // Everything up to the link should be text content
-          sd.appendChild(document.createTextNode(desc.slice(0, result.index)));
-
-          // Now create the link itself
-          var anchorEl = document.createElement("a");
-          anchorEl.setAttribute("id", "cert_domain_link");
-          anchorEl.setAttribute("title", result[1]);
-          anchorEl.appendChild(document.createTextNode(result[1]));
-          sd.appendChild(anchorEl);
-
-          // Finally, append text for anything after the closing </a>
-          sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length)));
-        }
-
-        var link = document.getElementById('cert_domain_link');
-        if (!link)
-          return;
-
-        var okHost = link.getAttribute("title");
-        var thisHost = document.location.hostname;
-        var proto = document.location.protocol;
-
-        // If okHost is a wildcard domain ("*.example.com") let's
-        // use "www" instead.  "*.example.com" isn't going to
-        // get anyone anywhere useful. bug 432491
-        okHost = okHost.replace(/^\*\./, "www.");
-
-        /* case #1:
-         * example.com uses an invalid security certificate.
-         *
-         * The certificate is only valid for www.example.com
-         *
-         * Make sure to include the "." ahead of thisHost so that
-         * a MitM attack on paypal.com doesn't hyperlink to "notpaypal.com"
-         *
-         * We'd normally just use a RegExp here except that we lack a
-         * library function to escape them properly (bug 248062), and
-         * domain names are famous for having '.' characters in them,
-         * which would allow spurious and possibly hostile matches.
-         */
-        if (endsWith(okHost, "." + thisHost))
-          link.href = proto + okHost;
-
-        /* case #2:
-         * browser.garage.maemo.org uses an invalid security certificate.
-         *
-         * The certificate is only valid for garage.maemo.org
-         */
-        if (endsWith(thisHost, "." + okHost))
-          link.href = proto + okHost;
-
-        // If we set a link, meaning there's something helpful for
-        // the user here, expand the section by default
-        if (link.href && getCSSClass() != "expertBadCert")
-          toggle("technicalContent");
-      }
-
-      function endsWith(haystack, needle) {
-        return haystack.slice(-needle.length) == needle;
-      }
-
-      function toggle(id) {
-        var el = document.getElementById(id);
-        if (el.getAttribute("collapsed"))
-          el.setAttribute("collapsed", false);
-        else
-          el.setAttribute("collapsed", true);
-      }
-    ]]></script>
-  </head>
-
-  <body id="errorPage" class="certerror" dir="&locale.dir;">
-
-   <!-- Error Title -->
-   <div id="errorTitle">
-     <h1 class="errorTitleText">&certerror.longpagetitle;</h1>
-   </div>
-
-    <!-- PAGE CONTAINER (for styling purposes only) -->
-    <div id="errorPageContainer">
-
-      <!-- LONG CONTENT (the section most likely to require scrolling) -->
-      <div id="errorLongContent">
-        <div id="introContent">
-          <p id="introContentP1">&certerror.introPara1;</p>
-        </div>
-
-        <!-- The following sections can be unhidden by default by setting the
-             "browser.xul.error_pages.expert_bad_cert" pref to true -->
-        <div id="technicalContent" collapsed="true">
-          <h2 onclick="toggle('technicalContent');" id="technicalContentHeading">&certerror.technical.heading;</h2>
-          <p id="technicalContentText"/>
-        </div>
-
-        <div id="expertContent" collapsed="true">
-          <h2 onclick="toggle('expertContent');" id="expertContentHeading">&certerror.expert.heading;</h2>
-          <div>
-            <p>&certerror.expert.content;</p>
-            <p>&certerror.expert.contentPara2;</p>
-            <button id="temporaryExceptionButton">&certerror.addTemporaryException.label;</button>
-            <button id="permanentExceptionButton">&certerror.addPermanentException.label;</button>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!--
-    - Note: It is important to run the script this way, instead of using
-    - an onload handler. This is because error pages are loaded as
-    - LOAD_BACKGROUND, which means that onload handlers will not be executed.
-    -->
-    <script type="application/javascript">initPage();</script>
-
-  </body>
-</html>
deleted file mode 100644
--- a/b2g/chrome/content/arrow.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="11px" style="position: absolute; top: -moz-calc(50% - 2px);">
-  <polyline points="1 1 5 6 9 1" stroke="#414141" stroke-width="2" stroke-linecap="round" fill="transparent" stroke-linejoin="round"/>
-</svg>
deleted file mode 100644
--- a/b2g/chrome/content/blank.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 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/. */
-
-body {
-  background: black;
-}
deleted file mode 100644
--- a/b2g/chrome/content/blank.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<!-- 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/.  -->
-
-<html>
-  <head>
-    <link rel="stylesheet" href="blank.css" type="text/css" media="all" />
-  </head>
-</html>
deleted file mode 100644
--- a/b2g/chrome/content/content.css
+++ /dev/null
@@ -1,321 +0,0 @@
-/* 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/. */
-
-@namespace url("http://www.w3.org/1999/xhtml");
-@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-
-/* Style the scrollbars */
-xul|window xul|scrollbar {
-  display: none;
-}
-
-/* Bug 1041576 - Scrollable with scrollgrab should not have scrollbars */
-
-@-moz-document domain(system.gaiamobile.org) {
-  .browser-container > xul|scrollbar {
-    display: none;
-  }
-}
-
-%ifdef MOZ_GRAPHENE
-.moz-noscrollbars > xul|scrollbar {
-  display: none;
-}
-%endif
-
-xul|scrollbar[root="true"] {
-  position: relative;
-  z-index: 2147483647;
-}
-
-xul|scrollbar {
-  -moz-appearance: none !important;
-  background-color: transparent !important;
-  background-image: none !important;
-  border: 0px solid transparent !important;
-  pointer-events: none;
-}
-
-/* Scrollbar code will reset the margin to the correct side depending on
-   where layout actually puts the scrollbar */
-xul|scrollbar[orient="vertical"] {
-  margin-left: -8px;
-  min-width: 8px;
-  max-width: 8px;
-}
-
-xul|scrollbar[orient="vertical"] xul|thumb {
-  max-width: 6px !important;
-  min-width: 6px !important;
-}
-
-xul|scrollbar[orient="horizontal"] {
-  margin-top: -8px;
-  min-height: 8px;
-  max-height: 8px;
-}
-
-xul|scrollbar[orient="horizontal"] xul|thumb {
-  max-height: 6px !important;
-  min-height: 6px !important;
-}
-
-xul|scrollbar:not([active="true"]),
-xul|scrollbar[disabled] {
-  opacity: 0;
-}
-
-xul|scrollbarbutton {
-  min-height: 8px !important;
-  min-width: 8px !important;
-  -moz-appearance: none !important;
-  visibility: hidden;
-}
-
-xul|scrollbarbutton[sbattr="scrollbar-up-top"],
-xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] {
-  display: none;
-}
-
-xul|thumb {
-  background-color: rgba(0, 0, 0, 0.4) !important;
-  -moz-border-top-colors: none !important;
-  -moz-border-bottom-colors: none !important;
-  -moz-border-right-colors: none !important;
-  -moz-border-left-colors: none !important;
-  border: 1px solid rgba(255, 255, 255, 0.4) !important;
-  border-radius: 3px;
-}
-
-xul|scrollbarbutton {
-  background-image: none !important;
-}
-
-%ifndef MOZ_GRAPHENE
-/* -moz-touch-enabled? media elements */
-:-moz-any(video, audio) > xul|videocontrols {
-  -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls");
-}
-
-select:not([size]):not([multiple]) > xul|scrollbar,
-select[size="1"] > xul|scrollbar,
-select:not([size]):not([multiple]) xul|scrollbarbutton,
-select[size="1"] xul|scrollbarbutton {
-  display: block;
-  margin-left: 0;
-  min-width: 16px;
-}
-
-/* Override inverse OS themes */
-select,
-textarea,
-button,
-xul|button,
-* > input:not([type="image"]) {
-  -moz-appearance: none !important;  /* See bug 598421 for fixing the platform */
-  border-radius: 3px;
-}
-
-select[size],
-select[multiple],
-select[size][multiple],
-textarea,
-* > input:not([type="image"]) {
-  border-style: solid;
-  border-color: #7d7d7d;
-  color: #414141;
-  background-color: white;
-}
-
-/* Selects are handled by the form helper, see bug 685197 */
-select option, select optgroup {
-  pointer-events: none;
-}
-
-select:not([size]):not([multiple]),
-select[size="0"],
-select[size="1"],
-* > input[type="button"],
-* > input[type="submit"],
-* > input[type="reset"],
-button {
-  border-style: solid;
-  border-color: #7d7d7d;
-  color: #414141;
-  background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(215,215,215,0.5) 18px, rgba(115,115,115,0.5) 100%);
-}
-
-input[type="checkbox"] {
-  background-color: white;
-}
-
-input[type="radio"] {
-  background-color: white;
-}
-
-select {
-  border-width: 1px;
-  padding: 1px;
-}
-
-select:not([size]):not([multiple]),
-select[size="0"],
-select[size="1"] {
-  padding: 0 1px 0 1px;
-}
-
-* > input:not([type="image"]) {
-  border-width: 1px;
-  padding: 1px;
-}
-
-textarea {
-  resize: none;
-  border-width: 1px;
-  padding-inline-start: 1px;
-  padding-inline-end: 1px;
-  padding-block-start: 2px;
-  padding-block-end: 2px;
-}
-
-input[type="button"],
-input[type="submit"],
-input[type="reset"],
-button {
-  border-width: 1px;
-  padding-inline-start: 7px;
-  padding-inline-end: 7px;
-  padding-block-start: 0;
-  padding-block-end: 0;
-}
-
-input[type="radio"],
-input[type="checkbox"] {
-  border: 1px solid #a7a7a7 !important;
-  padding-inline-start: 1px;
-  padding-inline-end: 1px;
-  padding-block-start: 2px;
-  padding-block-end: 2px;
-}
-
-select > button {
-  border-width: 0px !important;
-  margin: 0px !important;
-  padding: 0px !important;
-  border-radius: 0;
-  color: #414141;
-
-  background-image: radial-gradient(at bottom left, #bbbbbb 40%, #f5f5f5), url(arrow.svg) !important;
-  background-color: transparent;
-  background-position: -15px center, 4px center !important;
-  background-repeat: no-repeat, no-repeat !important;
-  background-size: 100% 90%, auto auto;
-
-  -moz-binding: none !important;
-  position: relative !important;
-  font-size: inherit;
-}
-
-select[size]:focus,
-select[multiple]:focus,
-select[size][multiple]:focus,
-textarea:focus,
-input[type="file"]:focus > input[type="text"],
-* > input:not([type="image"]):focus {
-  outline: 0px !important;
-  border-style: solid;
-  border-color: rgb(94,128,153);
-  background-color: white;
-}
-
-select:not([size]):not([multiple]):focus,
-select[size="0"]:focus,
-select[size="1"]:focus,
-input[type="button"]:focus,
-input[type="submit"]:focus,
-input[type="reset"]:focus,
-button:focus {
-  outline: 0px !important;
-  border-style: solid;
-  border-color: rgb(94,128,153);
-  background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(198,225,256,0.2) 18px, rgba(27,113,177,0.5) 100%);
-}
-
-input[type="checkbox"]:focus,
-input[type="radio"]:focus {
-  border-color: #99c6e0 !important;
-}
-
-/* we need to be specific for selects because the above rules are specific too */
-textarea[disabled],
-select[size][disabled],
-select[multiple][disabled],
-select[size][multiple][disabled],
-select:not([size]):not([multiple])[disabled],
-select[size="0"][disabled],
-select[size="1"][disabled],
-button[disabled],
-* > input:not([type="image"])[disabled] {
-  color: rgba(0,0,0,0.3);
-  border-color: rgba(125,125,125,0.4);
-  border-style: solid;
-  border-width: 1px;
-  background-color: #f5f5f5;
-}
-
-select:not([size]):not([multiple])[disabled],
-select[size="0"][disabled],
-select[size="1"][disabled] {
-  background-color: #f5f5f5;
-}
-
-input[type="button"][disabled],
-input[type="submit"][disabled],
-input[type="reset"][disabled],
-button[disabled] {
-  padding-inline-start: 7px;
-  padding-inline-end: 7px;
-  padding-block-start: 0;
-  padding-block-end: 0;
-  background-color: #f5f5f5;
-}
-
-input[type="radio"][disabled],
-input[type="radio"][disabled]:active,
-input[type="radio"][disabled]:hover,
-input[type="radio"][disabled]:hover:active,
-input[type="checkbox"][disabled],
-input[type="checkbox"][disabled]:active,
-input[type="checkbox"][disabled]:hover,
-input[type="checkbox"][disabled]:hover:active {
-  border:1px solid rgba(125,125,125,0.4) !important;
-}
-
-select[disabled] > button {
-  opacity: 0.6;
-  padding: 1px 7px 1px 7px;
-}
-
-*:any-link:active,
-*[role=button]:active,
-button:active,
-option:active,
-select:active,
-label:active {
-  background-color: rgba(141, 184, 216, 0.5);
-}
-
-input[type=number] > div > div, /* work around bug 946184 */
-input[type=number]::-moz-number-spin-box {
-  display: none;
-}
-%endif
-
-%ifdef MOZ_WIDGET_GONK
-/* This binding only provide key shortcuts that we can't use on devices */
-input,
-textarea {
--moz-binding: none !important;
-}
-%endif
deleted file mode 100644
--- a/b2g/chrome/content/desktop.css
+++ /dev/null
@@ -1,59 +0,0 @@
-#controls {
-  position: absolute;
-  left: 0;
-  bottom:0;
-  right: 0;
-  height: 30px;
-  background-color: -moz-dialog;
-}
-
-#home-button {
-  margin: auto;
-  margin-top: 3px;
-  width: 24px;
-  height: 24px;
-  background: #eee url("images/desktop/home-black.png") center no-repeat;
-  border: 1px solid #888;
-  border-radius: 12px;
-  display: block;
-}
-
-#home-button::-moz-focus-inner {
-  padding: 0;
-  border: 0;
-}
-
-#home-button:hover {
-  background-image: url("images/desktop/home-white.png");
-  background-color: #ccc;
-  border-color: #555;
-}
-
-#home-button.active {
-  background-image: url("images/desktop/home-white.png");
-  background-color: #888;
-  border-color: black;
-}
-
-#rotate-button {
-  position: absolute;
-  top: 3px;
-  bottom: 3px;
-  right: 3px;
-  width: 24px;
-  height: 24px;
-  background: #eee url("images/desktop/rotate.png") center no-repeat;
-  border: 1px solid #888;
-  border-radius: 12px;
-  display: block;
-}
-
-#rotate-button:hover {
-  background-color: #ccc;
-  border-color: #555;
-}
-
-#rotate-button.active {
-  background-color: #888;
-  border-color: black;
-}
deleted file mode 100644
--- a/b2g/chrome/content/desktop.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* 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/. */
-
-var browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
-var isMulet = "ResponsiveUI" in browserWindow;
-
-// Enable touch event shim on desktop that translates mouse events
-// into touch ones
-function enableTouch() {
-  let require = Cu.import('resource://devtools/shared/Loader.jsm', {})
-                  .devtools.require;
-  let { TouchEventSimulator } = require('devtools/shared/touch/simulator');
-  let touchEventSimulator = new TouchEventSimulator(shell.contentBrowser);
-  touchEventSimulator.start();
-}
-
-// Some additional buttons are displayed on simulators to fake hardware buttons.
-function setupButtons() {
-  let link = document.createElement('link');
-  link.type = 'text/css';
-  link.rel = 'stylesheet';
-  link.href = 'chrome://b2g/content/desktop.css';
-  document.head.appendChild(link);
-
-  let footer = document.createElement('footer');
-  footer.id = 'controls';
-  document.body.appendChild(footer);
-  let homeButton = document.createElement('button');
-  homeButton.id = 'home-button';
-  footer.appendChild(homeButton);
-  let rotateButton = document.createElement('button');
-  rotateButton.id = 'rotate-button';
-  footer.appendChild(rotateButton);
-
-  homeButton.addEventListener('mousedown', function() {
-    let window = shell.contentBrowser.contentWindow;
-    let e = new window.KeyboardEvent('keydown', {key: 'Home'});
-    window.dispatchEvent(e);
-    homeButton.classList.add('active');
-  });
-  homeButton.addEventListener('mouseup', function() {
-    let window = shell.contentBrowser.contentWindow;
-    let e = new window.KeyboardEvent('keyup', {key: 'Home'});
-    window.dispatchEvent(e);
-    homeButton.classList.remove('active');
-  });
-
-  Cu.import("resource://gre/modules/GlobalSimulatorScreen.jsm");
-  rotateButton.addEventListener('mousedown', function() {
-    rotateButton.classList.add('active');
-  });
-  rotateButton.addEventListener('mouseup', function() {
-    GlobalSimulatorScreen.flipScreen();
-    rotateButton.classList.remove('active');
-  });
-}
-
-function setupStorage() {
-  let directory = null;
-
-  // Get the --storage-path argument from the command line.
-  try {
-    let service = Cc['@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds'].getService(Ci.nsISupports);
-    let args = service.wrappedJSObject.cmdLine;
-    if (args) {
-      let path = args.handleFlagWithParam('storage-path', false);
-      directory = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
-      directory.initWithPath(path);
-    }
-  } catch(e) {
-    directory = null;
-  }
-
-  // Otherwise, default to 'storage' folder within current profile.
-  if (!directory) {
-    directory = Services.dirsvc.get('ProfD', Ci.nsIFile);
-    directory.append('storage');
-    if (!directory.exists()) {
-      directory.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt("755", 8));
-    }
-  }
-  dump("Set storage path to: " + directory.path + "\n");
-
-  // This is the magic, where we override the default location for the storages.
-  Services.prefs.setCharPref('device.storage.overrideRootDir', directory.path);
-}
-
-function checkDebuggerPort() {
-  // XXX: To be removed once bug 942756 lands.
-  // We are hacking 'unix-domain-socket' pref by setting a tcp port (number).
-  // SocketListener.open detects that it isn't a file path (string), and starts
-  // listening on the tcp port given here as command line argument.
-
-  // Get the command line arguments that were passed to the b2g client
-  let args;
-  try {
-    let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports);
-    args = service.wrappedJSObject.cmdLine;
-  } catch(e) {}
-
-  if (!args) {
-    return;
-  }
-
-  let dbgport;
-  try {
-    dbgport = args.handleFlagWithParam('start-debugger-server', false);
-  } catch(e) {}
-
-  if (dbgport) {
-    dump('Opening debugger server on ' + dbgport + '\n');
-    Services.prefs.setCharPref('devtools.debugger.unix-domain-socket', dbgport);
-  }
-}
-
-
-function initResponsiveDesign() {
-  Cu.import('resource://devtools/client/responsivedesign/responsivedesign.jsm');
-  ResponsiveUIManager.on('on', function(event, {tab:tab}) {
-    let responsive = ResponsiveUIManager.getResponsiveUIForTab(tab);
-    let document = tab.ownerDocument;
-
-    // Only tweak reponsive mode for shell.html tabs.
-    if (tab.linkedBrowser.contentWindow != window) {
-      return;
-    }
-
-    // Disable transition as they mess up with screen size handler
-    responsive.transitionsEnabled = false;
-
-    responsive.buildPhoneUI();
-
-    responsive.rotatebutton.addEventListener('command', function (evt) {
-      GlobalSimulatorScreen.flipScreen();
-      evt.stopImmediatePropagation();
-      evt.preventDefault();
-    }, true);
-
-    // Enable touch events
-    responsive.enableTouch();
-  });
-
-
-  let mgr = browserWindow.ResponsiveUI.ResponsiveUIManager;
-  mgr.toggle(browserWindow, browserWindow.gBrowser.selectedTab);
-
-}
-
-function openDevtools() {
-  // Open devtool panel while maximizing its size according to screen size
-  Services.prefs.setIntPref('devtools.toolbox.sidebar.width',
-                            browserWindow.outerWidth - 550);
-  Services.prefs.setCharPref('devtools.toolbox.host', 'side');
-  let {gDevTools} = Cu.import('resource://devtools/client/framework/gDevTools.jsm', {});
-  let {devtools} = Cu.import("resource://devtools/shared/Loader.jsm", {});
-  let target = devtools.TargetFactory.forTab(browserWindow.gBrowser.selectedTab);
-  gDevTools.showToolbox(target);
-}
-
-window.addEventListener('ContentStart', function() {
-  // On Firefox Mulet, touch events are enabled within the responsive mode
-  if (!isMulet) {
-    enableTouch();
-  }
-  if (Services.prefs.getBoolPref('b2g.software-buttons')) {
-    setupButtons();
-  }
-  checkDebuggerPort();
-  setupStorage();
-  // On Firefox mulet, we automagically enable the responsive mode
-  // and show the devtools
-  if (isMulet) {
-    initResponsiveDesign(browserWindow);
-    openDevtools();
-  }
-});
deleted file mode 100644
--- a/b2g/chrome/content/devtools/adb.js
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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/. */
-
-"use strict";
-
-// This file is only loaded on Gonk to manage ADB state
-
-Components.utils.import("resource://gre/modules/FileUtils.jsm");
-
-const DEBUG = false;
-var debug = function(str) {
-  dump("AdbController: " + str + "\n");
-}
-
-var AdbController = {
-  locked: undefined,
-  remoteDebuggerEnabled: undefined,
-  lockEnabled: undefined,
-  disableAdbTimer: null,
-  disableAdbTimeoutHours: 12,
-  umsActive: false,
-
-  setLockscreenEnabled: function(value) {
-    this.lockEnabled = value;
-    DEBUG && debug("setLockscreenEnabled = " + this.lockEnabled);
-    this.updateState();
-  },
-
-  setLockscreenState: function(value) {
-    this.locked = value;
-    DEBUG && debug("setLockscreenState = " + this.locked);
-    this.updateState();
-  },
-
-  setRemoteDebuggerState: function(value) {
-    this.remoteDebuggerEnabled = value;
-    DEBUG && debug("setRemoteDebuggerState = " + this.remoteDebuggerEnabled);
-    this.updateState();
-  },
-
-  startDisableAdbTimer: function() {
-    if (this.disableAdbTimer) {
-      this.disableAdbTimer.cancel();
-    } else {
-      this.disableAdbTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-      // eslint-disable-next-line mozilla/use-default-preference-values
-      try {
-        this.disableAdbTimeoutHours =
-          Services.prefs.getIntPref("b2g.adb.timeout-hours");
-      } catch (e) {
-        // This happens if the pref doesn't exist, in which case
-        // disableAdbTimeoutHours will still be set to the default.
-      }
-    }
-    if (this.disableAdbTimeoutHours <= 0) {
-      DEBUG && debug("Timer to disable ADB not started due to zero timeout");
-      return;
-    }
-
-    DEBUG && debug("Starting timer to disable ADB in " +
-                   this.disableAdbTimeoutHours + " hours");
-    let timeoutMilliseconds = this.disableAdbTimeoutHours * 60 * 60 * 1000;
-    this.disableAdbTimer.initWithCallback(this, timeoutMilliseconds,
-                                          Ci.nsITimer.TYPE_ONE_SHOT);
-  },
-
-  stopDisableAdbTimer: function() {
-    DEBUG && debug("Stopping timer to disable ADB");
-    if (this.disableAdbTimer) {
-      this.disableAdbTimer.cancel();
-      this.disableAdbTimer = null;
-    }
-  },
-
-  notify: function(aTimer) {
-    if (aTimer == this.disableAdbTimer) {
-      this.disableAdbTimer = null;
-      // The following dump will be the last thing that shows up in logcat,
-      // and will at least give the user a clue about why logcat was
-      // disconnected, if the user happens to be using logcat.
-      debug("ADB timer expired - disabling ADB\n");
-      navigator.mozSettings.createLock().set(
-        {'debugger.remote-mode': 'disabled'});
-    }
-  },
-
-  updateState: function() {
-    this.umsActive = false;
-  },
-
-  updateStateInternal: function() {
-    DEBUG && debug("updateStateInternal: called");
-
-    if (this.remoteDebuggerEnabled === undefined ||
-        this.lockEnabled === undefined ||
-        this.locked === undefined) {
-      // Part of initializing the settings database will cause the observers
-      // to trigger. We want to wait until both have been initialized before
-      // we start changing ther adb state. Without this then we can wind up
-      // toggling adb off and back on again (or on and back off again).
-      //
-      // For completeness, one scenario which toggles adb is using the unagi.
-      // The unagi has adb enabled by default (prior to b2g starting). If you
-      // have the phone lock disabled and remote debugging enabled, then we'll
-      // receive an unlock event and an rde event. However at the time we
-      // receive the unlock event we haven't yet received the rde event, so
-      // we turn adb off momentarily, which disconnects a logcat that might
-      // be running. Changing the defaults (in AdbController) just moves the
-      // problem to a different phone, which has adb disabled by default and
-      // we wind up turning on adb for a short period when we shouldn't.
-      //
-      // By waiting until both values are properly initialized, we avoid
-      // turning adb on or off accidentally.
-      DEBUG && debug("updateState: Waiting for all vars to be initialized");
-      return;
-    }
-
-    // Check if we have a remote debugging session going on. If so, we won't
-    // disable adb even if the screen is locked.
-    let isDebugging = USBRemoteDebugger.isDebugging;
-    DEBUG && debug("isDebugging=" + isDebugging);
-
-    // If USB Mass Storage, USB tethering, or a debug session is active,
-    // then we don't want to disable adb in an automatic fashion (i.e.
-    // when the screen locks or due to timeout).
-    let sysUsbConfig = libcutils.property_get("sys.usb.config").split(",");
-    let usbFuncActive = this.umsActive || isDebugging;
-    usbFuncActive |= (sysUsbConfig.indexOf("rndis") >= 0);
-    usbFuncActive |= (sysUsbConfig.indexOf("mtp") >= 0);
-
-    let enableAdb = this.remoteDebuggerEnabled &&
-      (!(this.lockEnabled && this.locked) || usbFuncActive);
-
-    let useDisableAdbTimer = true;
-
-    // Check wakelock to prevent adb from disconnecting when phone is locked
-    let lockFile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
-    lockFile.initWithPath('/sys/power/wake_lock');
-    if(lockFile.exists()) {
-      let foStream = Cc["@mozilla.org/network/file-input-stream;1"]
-            .createInstance(Ci.nsIFileInputStream);
-      let coStream = Cc["@mozilla.org/intl/converter-input-stream;1"]
-            .createInstance(Ci.nsIConverterInputStream);
-      let str = {};
-      foStream.init(lockFile, FileUtils.MODE_RDONLY, 0, 0);
-      coStream.init(foStream, "UTF-8", 0, 0);
-      coStream.readString(-1, str);
-      coStream.close();
-      foStream.close();
-      let wakeLockContents = str.value.replace(/\n/, "");
-      let wakeLockList = wakeLockContents.split(" ");
-      if (wakeLockList.indexOf("adb") >= 0) {
-        enableAdb = true;
-        useDisableAdbTimer = false;
-        DEBUG && debug("Keeping ADB enabled as ADB wakelock is present.");
-      } else {
-        DEBUG && debug("ADB wakelock not found.");
-      }
-    } else {
-      DEBUG && debug("Wake_lock file not found.");
-    }
-
-    DEBUG && debug("updateState: enableAdb = " + enableAdb +
-                   " remoteDebuggerEnabled = " + this.remoteDebuggerEnabled +
-                   " lockEnabled = " + this.lockEnabled +
-                   " locked = " + this.locked +
-                   " usbFuncActive = " + usbFuncActive);
-
-    // Configure adb.
-    let currentConfig = libcutils.property_get("persist.sys.usb.config");
-    let configFuncs = currentConfig.split(",");
-    if (currentConfig == "" || currentConfig == "none") {
-      // We want to treat none like the empty string.
-      // "".split(",") yields [""] and not []
-      configFuncs = [];
-    }
-    let adbIndex = configFuncs.indexOf("adb");
-
-    if (enableAdb) {
-      // Add adb to the list of functions, if not already present
-      if (adbIndex < 0) {
-        configFuncs.push("adb");
-      }
-    } else {
-      // Remove adb from the list of functions, if present
-      if (adbIndex >= 0) {
-        configFuncs.splice(adbIndex, 1);
-      }
-    }
-    let newConfig = configFuncs.join(",");
-    if (newConfig == "") {
-      // Convert the empty string back into none, since that's what init.rc
-      // needs.
-      newConfig = "none";
-    }
-    if (newConfig != currentConfig) {
-      DEBUG && debug("updateState: currentConfig = " + currentConfig);
-      DEBUG && debug("updateState:     newConfig = " + newConfig);
-      try {
-        libcutils.property_set("persist.sys.usb.config", newConfig);
-      } catch(e) {
-        Cu.reportError("Error configuring adb: " + e);
-      }
-    }
-    if (useDisableAdbTimer) {
-      if (enableAdb && !usbFuncActive) {
-        this.startDisableAdbTimer();
-      } else {
-        this.stopDisableAdbTimer();
-      }
-    }
-  }
-};
-
-SettingsListener.observe("lockscreen.locked", false,
-                         AdbController.setLockscreenState.bind(AdbController));
-SettingsListener.observe("lockscreen.enabled", false,
-                         AdbController.setLockscreenEnabled.bind(AdbController));
deleted file mode 100644
--- a/b2g/chrome/content/devtools/debugger.js
+++ /dev/null
@@ -1,397 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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/. */
-
-"use strict";
-
-XPCOMUtils.defineLazyGetter(this, "devtools", function() {
-  const { devtools } =
-    Cu.import("resource://devtools/shared/Loader.jsm", {});
-  return devtools;
-});
-
-XPCOMUtils.defineLazyGetter(this, "DebuggerServer", function() {
-  const { DebuggerServer } = devtools.require("devtools/server/main");
-  return DebuggerServer;
-});
-
-XPCOMUtils.defineLazyGetter(this, "B2GTabList", function() {
-  const { B2GTabList } =
-    devtools.require("resource://gre/modules/DebuggerActors.js");
-  return B2GTabList;
-});
-
-// Load the discovery module eagerly, so that it can set a device name at
-// startup.  This does not cause discovery to start listening for packets, as
-// that only happens once DevTools is enabled.
-devtools.require("devtools/shared/discovery/discovery");
-
-var RemoteDebugger = {
-  _listening: false,
-
-  /**
-   * Prompt the user to accept or decline the incoming connection.
-   *
-   * @param session object
-   *        The session object will contain at least the following fields:
-   *        {
-   *          authentication,
-   *          client: {
-   *            host,
-   *            port
-   *          },
-   *          server: {
-   *            host,
-   *            port
-   *          }
-   *        }
-   *        Specific authentication modes may include additional fields.  Check
-   *        the different |allowConnection| methods in
-   *        devtools/shared/security/auth.js.
-   * @return An AuthenticationResult value.
-   *         A promise that will be resolved to the above is also allowed.
-   */
-  allowConnection(session) {
-    if (this._promptingForAllow) {
-      // Don't stack connection prompts if one is already open
-      return DebuggerServer.AuthenticationResult.DENY;
-    }
-    this._listen();
-
-    this._promptingForAllow = new Promise(resolve => {
-      this._handleAllowResult = detail => {
-        this._handleAllowResult = null;
-        this._promptingForAllow = null;
-        // Newer Gaia supplies |authResult|, which is one of the
-        // AuthenticationResult values.
-        if (detail.authResult) {
-          resolve(detail.authResult);
-        } else if (detail.value) {
-          resolve(DebuggerServer.AuthenticationResult.ALLOW);
-        } else {
-          resolve(DebuggerServer.AuthenticationResult.DENY);
-        }
-      };
-
-      shell.sendChromeEvent({
-        type: "remote-debugger-prompt",
-        session
-      });
-    });
-
-    return this._promptingForAllow;
-  },
-
-  /**
-   * During OOB_CERT authentication, the user must transfer some data through some
-   * out of band mechanism from the client to the server to authenticate the
-   * devices.
-   *
-   * This implementation instructs Gaia to continually capture images which are
-   * passed back here and run through a QR decoder.
-   *
-   * @return An object containing:
-   *         * sha256: hash(ClientCert)
-   *         * k     : K(random 128-bit number)
-   *         A promise that will be resolved to the above is also allowed.
-   */
-  receiveOOB() {
-    if (this._receivingOOB) {
-      return this._receivingOOB;
-    }
-    this._listen();
-
-    const QR = devtools.require("devtools/shared/qrcode/index");
-    this._receivingOOB = new Promise((resolve, reject) => {
-      this._handleAuthEvent = detail => {
-        debug(detail.action);
-        if (detail.action === "abort") {
-          this._handleAuthEvent = null;
-          this._receivingOOB = null;
-          reject();
-          return;
-        }
-
-        if (detail.action !== "capture") {
-          return;
-        }
-
-        let url = detail.url;
-        QR.decodeFromURI(url).then(data => {
-          debug("Got auth data: " + data);
-          let oob = JSON.parse(data);
-
-          shell.sendChromeEvent({
-            type: "devtools-auth",
-            action: "stop"
-          });
-
-          this._handleAuthEvent = null;
-          this._receivingOOB = null;
-          resolve(oob);
-        }).catch(() => {
-          debug("No auth data, requesting new capture");
-          shell.sendChromeEvent({
-            type: "devtools-auth",
-            action: "capture"
-          });
-        });
-      };
-
-      // Show QR scanning dialog, get an initial capture
-      shell.sendChromeEvent({
-        type: "devtools-auth",
-        action: "start"
-      });
-    });
-
-    return this._receivingOOB;
-  },
-
-  _listen: function() {
-    if (this._listening) {
-      return;
-    }
-
-    this.handleEvent = this.handleEvent.bind(this);
-    let content = shell.contentBrowser.contentWindow;
-    content.addEventListener("mozContentEvent", this, false, true);
-    this._listening = true;
-  },
-
-  handleEvent: function(event) {
-    let detail = event.detail;
-    if (detail.type === "remote-debugger-prompt" && this._handleAllowResult) {
-      this._handleAllowResult(detail);
-    }
-    if (detail.type === "devtools-auth" && this._handleAuthEvent) {
-      this._handleAuthEvent(detail);
-    }
-  },
-
-  initServer: function() {
-    if (DebuggerServer.initialized) {
-      return;
-    }
-
-    // Ask for remote connections.
-    DebuggerServer.init();
-
-    // /!\ Be careful when adding a new actor, especially global actors.
-    // Any new global actor will be exposed and returned by the root actor.
-
-    // Add Firefox-specific actors, but prevent tab actors to be loaded in
-    // the parent process, unless we enable certified apps debugging.
-    let restrictPrivileges = Services.prefs.getBoolPref("devtools.debugger.forbid-certified-apps");
-    DebuggerServer.addBrowserActors("navigator:browser", restrictPrivileges);
-
-    // Allow debugging of chrome for any process
-    if (!restrictPrivileges) {
-      DebuggerServer.allowChromeProcess = true;
-    }
-
-    /**
-     * Construct a root actor appropriate for use in a server running in B2G.
-     * The returned root actor respects the factories registered with
-     * DebuggerServer.addGlobalActor only if certified apps debugging is on,
-     * otherwise we used an explicit limited list of global actors
-     *
-     * * @param connection DebuggerServerConnection
-     *        The conection to the client.
-     */
-    DebuggerServer.createRootActor = function createRootActor(connection)
-    {
-      let parameters = {
-        tabList: new B2GTabList(connection),
-        // Use an explicit global actor list to prevent exposing
-        // unexpected actors
-        globalActorFactories: restrictPrivileges ? {
-          webappsActor: DebuggerServer.globalActorFactories.webappsActor,
-          deviceActor: DebuggerServer.globalActorFactories.deviceActor,
-          settingsActor: DebuggerServer.globalActorFactories.settingsActor
-        } : DebuggerServer.globalActorFactories
-      };
-      let { RootActor } = devtools.require("devtools/server/actors/root");
-      let root = new RootActor(connection, parameters);
-      root.applicationType = "operating-system";
-      return root;
-    };
-
-    if (isGonk) {
-      DebuggerServer.on("connectionchange", function() {
-        AdbController.updateState();
-      });
-    }
-  }
-};
-
-RemoteDebugger.allowConnection =
-  RemoteDebugger.allowConnection.bind(RemoteDebugger);
-RemoteDebugger.receiveOOB =
-  RemoteDebugger.receiveOOB.bind(RemoteDebugger);
-
-var USBRemoteDebugger = {
-
-  get isDebugging() {
-    if (!this._listener) {
-      return false;
-    }
-
-    return DebuggerServer._connections &&
-           Object.keys(DebuggerServer._connections).length > 0;
-  },
-
-  start: function() {
-    if (this._listener) {
-      return;
-    }
-
-    RemoteDebugger.initServer();
-
-    let portOrPath =
-      Services.prefs.getCharPref("devtools.debugger.unix-domain-socket") ||
-      "/data/local/debugger-socket";
-
-    try {
-      debug("Starting USB debugger on " + portOrPath);
-      let AuthenticatorType = DebuggerServer.Authenticators.get("PROMPT");
-      let authenticator = new AuthenticatorType.Server();
-      authenticator.allowConnection = RemoteDebugger.allowConnection;
-      this._listener = DebuggerServer.createListener();
-      this._listener.portOrPath = portOrPath;
-      this._listener.authenticator = authenticator;
-      this._listener.open();
-      // Temporary event, until bug 942756 lands and offers a way to know
-      // when the server is up and running.
-      Services.obs.notifyObservers(null, "debugger-server-started");
-    } catch (e) {
-      debug("Unable to start USB debugger server: " + e);
-    }
-  },
-
-  stop: function() {
-    if (!this._listener) {
-      return;
-    }
-
-    try {
-      this._listener.close();
-      this._listener = null;
-    } catch (e) {
-      debug("Unable to stop USB debugger server: " + e);
-    }
-  }
-
-};
-
-var WiFiRemoteDebugger = {
-
-  start: function() {
-    if (this._listener) {
-      return;
-    }
-
-    RemoteDebugger.initServer();
-
-    try {
-      debug("Starting WiFi debugger");
-      let AuthenticatorType = DebuggerServer.Authenticators.get("OOB_CERT");
-      let authenticator = new AuthenticatorType.Server();
-      authenticator.allowConnection = RemoteDebugger.allowConnection;
-      authenticator.receiveOOB = RemoteDebugger.receiveOOB;
-      this._listener = DebuggerServer.createListener();
-      this._listener.portOrPath = -1 /* any available port */;
-      this._listener.authenticator = authenticator;
-      this._listener.discoverable = true;
-      this._listener.encryption = true;
-      this._listener.open();
-      let port = this._listener.port;
-      debug("Started WiFi debugger on " + port);
-    } catch (e) {
-      debug("Unable to start WiFi debugger server: " + e);
-    }
-  },
-
-  stop: function() {
-    if (!this._listener) {
-      return;
-    }
-
-    try {
-      this._listener.close();
-      this._listener = null;
-    } catch (e) {
-      debug("Unable to stop WiFi debugger server: " + e);
-    }
-  }
-
-};
-
-(function() {
-  // Track these separately here so we can determine the correct value for the
-  // pref "devtools.debugger.remote-enabled", which is true when either mode of
-  // using DevTools is enabled.
-  let devtoolsUSB = false;
-  let devtoolsWiFi = false;
-
-  // Keep the old setting to not break people that won't have updated
-  // gaia and gecko.
-  SettingsListener.observe("devtools.debugger.remote-enabled", false,
-                           function(value) {
-    devtoolsUSB = value;
-    Services.prefs.setBoolPref("devtools.debugger.remote-enabled",
-                               devtoolsUSB || devtoolsWiFi);
-    // This preference is consulted during startup
-    Services.prefs.savePrefFile(null);
-    try {
-      value ? USBRemoteDebugger.start() : USBRemoteDebugger.stop();
-    } catch(e) {
-      dump("Error while initializing USB devtools: " +
-           e + "\n" + e.stack + "\n");
-    }
-  });
-
-  SettingsListener.observe("debugger.remote-mode", "disabled", function(value) {
-    if (["disabled", "adb-only", "adb-devtools"].indexOf(value) == -1) {
-      dump("Illegal value for debugger.remote-mode: " + value + "\n");
-      return;
-    }
-
-    devtoolsUSB = value == "adb-devtools";
-    Services.prefs.setBoolPref("devtools.debugger.remote-enabled",
-                               devtoolsUSB || devtoolsWiFi);
-    // This preference is consulted during startup
-    Services.prefs.savePrefFile(null);
-
-    try {
-      (value == "adb-devtools") ? USBRemoteDebugger.start()
-                                : USBRemoteDebugger.stop();
-    } catch(e) {
-      dump("Error while initializing USB devtools: " +
-           e + "\n" + e.stack + "\n");
-    }
-
-    isGonk && AdbController.setRemoteDebuggerState(value != "disabled");
-  });
-
-  SettingsListener.observe("devtools.remote.wifi.enabled", false,
-                           function(value) {
-    devtoolsWiFi = value;
-    Services.prefs.setBoolPref("devtools.debugger.remote-enabled",
-                               devtoolsUSB || devtoolsWiFi);
-    // Allow remote debugging on non-local interfaces when WiFi debug is enabled
-    // TODO: Bug 1034411: Lock down to WiFi interface, instead of all interfaces
-    Services.prefs.setBoolPref("devtools.debugger.force-local", !value);
-    // This preference is consulted during startup
-    Services.prefs.savePrefFile(null);
-
-    try {
-      value ? WiFiRemoteDebugger.start() : WiFiRemoteDebugger.stop();
-    } catch(e) {
-      dump("Error while initializing WiFi devtools: " +
-           e + "\n" + e.stack + "\n");
-    }
-  });
-})();
deleted file mode 100644
--- a/b2g/chrome/content/devtools/hud.js
+++ /dev/null
@@ -1,867 +0,0 @@
-/* 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/. */
-
-'use strict';
-
-// settings.js loads this file when the HUD setting is enabled.
-
-const DEVELOPER_HUD_LOG_PREFIX = 'DeveloperHUD';
-const CUSTOM_HISTOGRAM_PREFIX = 'DEVTOOLS_HUD_CUSTOM_';
-const APPNAME_IDX = 3;
-const HISTNAME_IDX = 4;
-
-XPCOMUtils.defineLazyGetter(this, 'devtools', function() {
-  const {devtools} = Cu.import('resource://devtools/shared/Loader.jsm', {});
-  return devtools;
-});
-
-XPCOMUtils.defineLazyGetter(this, 'DebuggerClient', function() {
-  return devtools.require('devtools/shared/client/main').DebuggerClient;
-});
-
-XPCOMUtils.defineLazyGetter(this, 'WebConsoleUtils', function() {
-  return devtools.require('devtools/shared/webconsole/utils').Utils;
-});
-
-XPCOMUtils.defineLazyGetter(this, 'EventLoopLagFront', function() {
-  return devtools.require('devtools/shared/fronts/eventlooplag').EventLoopLagFront;
-});
-
-XPCOMUtils.defineLazyGetter(this, 'PerformanceEntriesFront', function() {
-  return devtools.require('devtools/server/actors/performance-entries').PerformanceEntriesFront;
-});
-
-XPCOMUtils.defineLazyGetter(this, 'MemoryFront', function() {
-  return devtools.require('devtools/server/actors/memory').MemoryFront;
-});
-
-var _telemetryDebug = false;
-
-function telemetryDebug(...args) {
-  if (_telemetryDebug) {
-    args.unshift('[AdvancedTelemetry]');
-    console.log(...args);
-  }
-}
-
-/**
- * The Developer HUD is an on-device developer tool that displays widgets,
- * showing visual debug information about apps. Each widget corresponds to a
- * metric as tracked by a metric watcher (e.g. consoleWatcher).
- */
-var developerHUD = {
-
-  _histograms: new Set(),
-  _customHistograms: new Set(),
-  _client: null,
-  _conn: null,
-  _watchers: [],
-  _logging: true,
-  _telemetry: false,
-
-  /**
-   * This method registers a metric watcher that will watch one or more metrics
-   * on app frames that are being tracked. A watcher must implement the
-   * `trackTarget(target)` and `untrackTarget(target)` methods, register
-   * observed metrics with `target.register(metric)`, and keep them up-to-date
-   * with `target.update(metric, message)` when necessary.
-   */
-  registerWatcher(watcher) {
-    this._watchers.unshift(watcher);
-  },
-
-  init() {
-    if (this._client) {
-      return;
-    }
-
-    if (!DebuggerServer.initialized) {
-      RemoteDebugger.initServer();
-    }
-
-    // We instantiate a local debugger connection so that watchers can use our
-    // DebuggerClient to send requests to tab actors (e.g. the consoleActor).
-    // Note the special usage of the private _serverConnection, which we need
-    // to call connectToChild and set up child process actors on a frame we
-    // intend to track. These actors will use the connection to communicate with
-    // our DebuggerServer in the parent process.
-    let transport = DebuggerServer.connectPipe();
-    this._conn = transport._serverConnection;
-    this._client = new DebuggerClient(transport);
-
-    for (let w of this._watchers) {
-      if (w.init) {
-        w.init(this._client);
-      }
-    }
-
-    SettingsListener.observe('hud.logging', this._logging, enabled => {
-      this._logging = enabled;
-    });
-
-    SettingsListener.observe('hud.telemetry.logging', _telemetryDebug, enabled => {
-      _telemetryDebug = enabled;
-    });
-
-    SettingsListener.observe('metrics.selectedMetrics.level', "", level => {
-      this._telemetry = (level === 'Enhanced');
-    });
-  },
-
-  uninit() {
-    if (!this._client) {
-      return;
-    }
-
-    this._client.close();
-    delete this._client;
-  },
-
-  log(message) {
-    if (this._logging) {
-      dump(DEVELOPER_HUD_LOG_PREFIX + ': ' + message + '\n');
-    }
-  }
-
-};
-
-
-/**
- * A Target object represents all there is to know about a Firefox OS app frame
- * that is being tracked, e.g. a pointer to the frame, current values of watched
- * metrics, and how to notify the front-end when metrics have changed.
- */
-function Target(frame, actor) {
-  this.frame = frame;
-  this.actor = actor;
-  this.metrics = new Map();
-  this._appName = null;
-}
-
-Target.prototype = {
-
-  get manifest() {
-    return this.frame.appManifestURL;
-  },
-
-  get appName() {
-
-    if (this._appName) {
-      return this._appName;
-    }
-
-    let manifest = this.manifest;
-    if (!manifest) {
-      let msg = DEVELOPER_HUD_LOG_PREFIX + ': Unable to determine app for telemetry metric. src: ' +
-                this.frame.src;
-      console.error(msg);
-      return null;
-    }
-
-    // "communications" apps are a special case
-    if (manifest.indexOf('communications') === -1) {
-      let start = manifest.indexOf('/') + 2;
-      let end = manifest.indexOf('.', start);
-      this._appName = manifest.substring(start, end).toLowerCase();
-    } else {
-      let src = this.frame.src;
-      if (src) {
-        // e.g., `app://communications.gaiamobile.org/contacts/index.html`
-        let parts = src.split('/');
-        let APP = 3;
-        let EXPECTED_PARTS_LENGTH = 5;
-        if (parts.length === EXPECTED_PARTS_LENGTH) {
-          this._appName = parts[APP];
-        }
-      }
-    }
-
-    return this._appName;
-  },
-
-  /**
-   * Register a metric that can later be updated. Does not update the front-end.
-   */
-  register(metric) {
-    this.metrics.set(metric, 0);
-  },
-
-  /**
-   * Modify one of a target's metrics, and send out an event to notify relevant
-   * parties (e.g. the developer HUD, automated tests, etc).
-   */
-  update(metric, message) {
-    if (!metric.name) {
-      throw new Error('Missing metric.name');
-    }
-
-    if (!metric.value) {
-      metric.value = 0;
-    }
-
-    let metrics = this.metrics;
-    if (metrics) {
-      metrics.set(metric.name, metric.value);
-    }
-
-    let data = {
-      metrics: [], // FIXME(Bug 982066) Remove this field.
-      manifest: this.manifest,
-      metric: metric,
-      message: message
-    };
-
-    // FIXME(Bug 982066) Remove this loop.
-    if (metrics && metrics.size > 0) {
-      for (let name of metrics.keys()) {
-        data.metrics.push({name: name, value: metrics.get(name)});
-      }
-    }
-
-    if (message) {
-      developerHUD.log('[' + data.manifest + '] ' + data.message);
-    }
-
-    this._send(data);
-  },
-
-  /**
-   * Nicer way to call update() when the metric value is a number that needs
-   * to be incremented.
-   */
-  bump(metric, message) {
-    metric.value = (this.metrics.get(metric.name) || 0) + 1;
-    this.update(metric, message);
-  },
-
-  /**
-   * Void a metric value and make sure it isn't displayed on the front-end
-   * anymore.
-   */
-  clear(metric) {
-    metric.value = 0;
-    this.update(metric);
-  },
-
-  /**
-   * Tear everything down, including the front-end by sending a message without
-   * widgets.
-   */
-  destroy() {
-    delete this.metrics;
-    this._send({metric: {skipTelemetry: true}});
-  },
-
-  _send(data) {
-    let frame = this.frame;
-
-    shell.sendEvent(frame, 'developer-hud-update', Cu.cloneInto(data, frame));
-    this._logHistogram(data.metric);
-  },
-
-  _clearTelemetryData() {
-    developerHUD._histograms.forEach(function(item) {
-      Services.telemetry.getKeyedHistogramById(item).clear();
-    });
-  },
-
-  _sendTelemetryData() {
-    if (!developerHUD._telemetry) {
-      return;
-    }
-    telemetryDebug('calling sendTelemetryData');
-    let frame = this.frame;
-    let payload = {
-      keyedHistograms: {},
-    };
-    // Package the hud histograms.
-    developerHUD._histograms.forEach(function(item) {
-      payload.keyedHistograms[item] =
-        Services.telemetry.getKeyedHistogramById(item).snapshot();
-    });
-
-    shell.sendEvent(frame, 'advanced-telemetry-update', Cu.cloneInto(payload, frame));
-  },
-
-  _logHistogram(metric) {
-    //method left as no-op as histograms are not in use anymore.
-  }
-};
-
-
-/**
- * The Console Watcher tracks the following metrics in apps: reflows, warnings,
- * and errors, with security errors reported separately.
- */
-var consoleWatcher = {
-
-  _client: null,
-  _targets: new Map(),
-  _watching: {
-    reflows: false,
-    warnings: false,
-    errors: false,
-    security: false
-  },
-  _security: [
-    'Mixed Content Blocker',
-    'Mixed Content Message',
-    'CSP',
-    'Invalid HSTS Headers',
-    'Invalid HPKP Headers',
-    'Insecure Password Field',
-    'SSL',
-    'CORS'
-  ],
-  _reflowThreshold: 0,
-
-  init(client) {
-    this._client = client;
-    this.consoleListener = this.consoleListener.bind(this);
-
-    let watching = this._watching;
-
-    for (let key in watching) {
-      let metric = key;
-      SettingsListener.observe('hud.' + metric, watching[metric], watch => {
-        // Watch or unwatch the metric.
-        if (watching[metric] = watch) {
-          return;
-        }
-
-        // If unwatched, remove any existing widgets for that metric.
-        for (let target of this._targets.values()) {
-          target.clear({name: metric});
-        }
-      });
-    }
-
-    SettingsListener.observe('hud.reflows.duration', this._reflowThreshold, threshold => {
-      this._reflowThreshold = threshold;
-    });
-
-    client.addListener('logMessage', this.consoleListener);
-    client.addListener('pageError', this.consoleListener);
-    client.addListener('consoleAPICall', this.consoleListener);
-    client.addListener('reflowActivity', this.consoleListener);
-  },
-
-  trackTarget(target) {
-    target.register('reflows');
-    target.register('warnings');
-    target.register('errors');
-    target.register('security');
-
-    this._client.request({
-      to: target.actor.consoleActor,
-      type: 'startListeners',
-      listeners: ['LogMessage', 'PageError', 'ConsoleAPI', 'ReflowActivity']
-    }, (res) => {
-      this._targets.set(target.actor.consoleActor, target);
-    });
-  },
-
-  untrackTarget(target) {
-    this._client.request({
-      to: target.actor.consoleActor,
-      type: 'stopListeners',
-      listeners: ['LogMessage', 'PageError', 'ConsoleAPI', 'ReflowActivity']
-    }, (res) => { });
-
-    this._targets.delete(target.actor.consoleActor);
-  },
-
-  consoleListener(type, packet) {
-    let target = this._targets.get(packet.from);
-    let metric = {};
-    let output = '';
-
-    switch (packet.type) {
-
-      case 'pageError':
-        let pageError = packet.pageError;
-
-        if (pageError.warning || pageError.strict) {
-          metric.name = 'warnings';
-          output += 'Warning (';
-        } else {
-          metric.name = 'errors';
-          output += 'Error (';
-        }
-
-        if (this._security.indexOf(pageError.category) > -1) {
-          metric.name = 'security';
-
-          // Telemetry sends the security error category not the
-          // count of security errors.
-          target._logHistogram({
-            name: 'security_category',
-            value: pageError.category
-          });
-
-          // Indicate that the 'hud' security metric (the count of security
-          // errors) should not be sent as a telemetry metric since the
-          // security error category is being sent instead.
-          metric.skipTelemetry = true;
-        }
-
-        let {errorMessage, sourceName, category, lineNumber, columnNumber} = pageError;
-        output += category + '): "' + (errorMessage.initial || errorMessage) +
-          '" in ' + sourceName + ':' + lineNumber + ':' + columnNumber;
-        break;
-
-      case 'consoleAPICall':
-        switch (packet.message.level) {
-
-          case 'error':
-            metric.name = 'errors';
-            output += 'Error (console)';
-            break;
-
-          case 'warn':
-            metric.name = 'warnings';
-            output += 'Warning (console)';
-            break;
-
-          case 'info':
-            this.handleTelemetryMessage(target, packet);
-
-            // Currently, informational log entries are tracked only by
-            // telemetry. Nonetheless, for consistency, we continue here
-            // and let the function return normally, when it concludes 'info'
-            // entries are not being watched.
-            metric.name = 'info';
-            break;
-
-          default:
-            return;
-        }
-        break;
-
-      case 'reflowActivity':
-        metric.name = 'reflows';
-
-        let {start, end, sourceURL, interruptible} = packet;
-        metric.interruptible = interruptible;
-        let duration = Math.round((end - start) * 100) / 100;
-
-        // Record the reflow if the duration exceeds the threshold.
-        if (duration < this._reflowThreshold) {
-          return;
-        }
-
-        output += 'Reflow: ' + duration + 'ms';
-        if (sourceURL) {
-          output += ' ' + this.formatSourceURL(packet);
-        }
-
-        // Telemetry also records reflow duration.
-        target._logHistogram({
-          name: 'reflow_duration',
-          value: Math.round(duration)
-        });
-        break;
-
-      default:
-        return;
-    }
-
-    if (developerHUD._telemetry) {
-      // Always record telemetry for these metrics.
-      if (metric.name === 'errors' || metric.name === 'warnings' || metric.name === 'reflows') {
-        let value = target.metrics.get(metric.name);
-        metric.value = (value || 0) + 1;
-        target._logHistogram(metric);
-
-        // Telemetry has already been recorded.
-        metric.skipTelemetry = true;
-
-        // If the metric is not being watched, persist the incremented value.
-        // If the metric is being watched, `target.bump` will increment the value
-        // of the metric and will persist the incremented value.
-        if (!this._watching[metric.name]) {
-          target.metrics.set(metric.name, metric.value);
-        }
-      }
-    }
-
-    if (!this._watching[metric.name]) {
-      return;
-    }
-
-    target.bump(metric, output);
-  },
-
-  formatSourceURL(packet) {
-    // Abbreviate source URL
-    let source = WebConsoleUtils.abbreviateSourceURL(packet.sourceURL);
-
-    // Add function name and line number
-    let {functionName, sourceLine} = packet;
-    source = 'in ' + (functionName || '<anonymousFunction>') +
-      ', ' + source + ':' + sourceLine;
-
-    return source;
-  },
-
-  handleTelemetryMessage(target, packet) {
-    if (!developerHUD._telemetry) {
-      return;
-    }
-
-    // If this is a 'telemetry' log entry, create a telemetry metric from
-    // the log content.
-    let separator = '|';
-    let logContent = packet.message.arguments.toString();
-
-    if (logContent.indexOf('telemetry') < 0) {
-      return;
-    }
-
-    let telemetryData = logContent.split(separator);
-
-    // Positions of the components of a telemetry log entry.
-    let TELEMETRY_IDENTIFIER_IDX = 0;
-    let NAME_IDX = 1;
-    let VALUE_IDX = 2;
-    let TYPE_IDX = 2;
-    let MIN_IDX = 3;
-    let MAX_IDX = 4;
-    let BUCKETS_IDX = 5;
-    let MAX_CUSTOM_ARGS = 6;
-    let MIN_CUSTOM_ARGS = 3;
-
-    if (telemetryData[TELEMETRY_IDENTIFIER_IDX] != 'telemetry' ||
-        telemetryData.length < MIN_CUSTOM_ARGS ||
-        telemetryData.length > MAX_CUSTOM_ARGS) {
-      return;
-    }
-
-    let metric = {
-      name: telemetryData[NAME_IDX]
-    };
-
-    if (metric.name === 'MGMT') {
-      metric.value = telemetryData[VALUE_IDX];
-      if (metric.value === 'TIMETOSHIP') {
-        telemetryDebug('Received a Ship event');
-        target._sendTelemetryData();
-      } else if (metric.value === 'CLEARMETRICS') {
-        target._clearTelemetryData();
-      }
-    } else {
-      if (telemetryData.length === MIN_CUSTOM_ARGS) {
-        metric.value = telemetryData[VALUE_IDX];
-      } else if (telemetryData.length === MAX_CUSTOM_ARGS) {
-        metric.type = telemetryData[TYPE_IDX];
-        metric.min = telemetryData[MIN_IDX];
-        metric.max = telemetryData[MAX_IDX];
-        metric.buckets = telemetryData[BUCKETS_IDX];
-      }
-      metric.custom = true;
-      target._logHistogram(metric);
-    }
-  }
-};
-developerHUD.registerWatcher(consoleWatcher);
-
-
-var eventLoopLagWatcher = {
-  _client: null,
-  _fronts: new Map(),
-  _active: false,
-
-  init(client) {
-    this._client = client;
-
-    SettingsListener.observe('hud.jank', false, this.settingsListener.bind(this));
-  },
-
-  settingsListener(value) {
-    if (this._active == value) {
-      return;
-    }
-
-    this._active = value;
-
-    // Toggle the state of existing fronts.
-    let fronts = this._fronts;
-    for (let target of fronts.keys()) {
-      if (value) {
-        fronts.get(target).start();
-      } else {
-        fronts.get(target).stop();
-        target.clear({name: 'jank'});
-      }
-    }
-  },
-
-  trackTarget(target) {
-    target.register('jank');
-
-    let front = new EventLoopLagFront(this._client, target.actor);
-    this._fronts.set(target, front);
-
-    front.on('event-loop-lag', time => {
-      target.update({name: 'jank', value: time}, 'Jank: ' + time + 'ms');
-    });
-
-    if (this._active) {
-      front.start();
-    }
-  },
-
-  untrackTarget(target) {
-    let fronts = this._fronts;
-    if (fronts.has(target)) {
-      fronts.get(target).destroy();
-      fronts.delete(target);
-    }
-  }
-};
-developerHUD.registerWatcher(eventLoopLagWatcher);
-
-/*
- * The performanceEntriesWatcher determines the delta between the epoch
- * of an app's launch time and the epoch of the app's performance entry marks.
- * When it receives an "appLaunch" performance entry mark it records the
- * name of the app being launched and the epoch of when the launch ocurred.
- * When it receives subsequent performance entry events for the app being
- * launched, it records the delta of the performance entry opoch compared
- * to the app-launch epoch and emits an "app-start-time-<performance mark name>"
- * event containing the delta.
- *
- * Additionally, while recording the "app-start-time" for a performance mark,
- * USS memory at the time of the performance mark is also recorded.
- */
-var performanceEntriesWatcher = {
-  _client: null,
-  _fronts: new Map(),
-  _appLaunch: new Map(),
-  _supported: [
-    'contentInteractive',
-    'navigationInteractive',
-    'navigationLoaded',
-    'visuallyLoaded',
-    'fullyLoaded',
-    'mediaEnumerated',
-    'scanEnd'
-  ],
-
-  init(client) {
-    this._client = client;
-    let setting = 'devtools.telemetry.supported_performance_marks';
-    let defaultValue = this._supported.join(',');
-
-    SettingsListener.observe(setting, defaultValue, supported => {
-      this._supported = supported.split(',');
-    });
-  },
-
-  trackTarget(target) {
-    // The performanceEntries watcher doesn't register a metric because
-    // currently the metrics generated are not displayed in
-    // in the front-end.
-
-    let front = new PerformanceEntriesFront(this._client, target.actor);
-    this._fronts.set(target, front);
-
-    // User timings are always gathered; there is no setting to enable/
-    // disable.
-    front.start();
-
-    front.on('entry', detail => {
-
-      // Only process performance marks.
-      if (detail.type !== 'mark') {
-        return;
-      }
-
-      let name = detail.name;
-      let epoch = detail.epoch;
-
-      // If this is an "app launch" mark, record the app that was
-      // launched and the epoch of when it was launched.
-      if (name.indexOf('appLaunch') !== -1) {
-        let CHARS_UNTIL_APP_NAME = 7; // '@app://'
-        let startPos = name.indexOf('@app') + CHARS_UNTIL_APP_NAME;
-        let endPos = name.indexOf('.');
-        let appName = name.slice(startPos, endPos);
-        this._appLaunch.set(appName, epoch);
-        return;
-      }
-
-      // Only process supported performance marks
-      if (this._supported.indexOf(name) === -1) {
-        return;
-      }
-
-      let origin = detail.origin;
-      origin = origin.slice(0, origin.indexOf('.'));
-
-      let appLaunchTime = this._appLaunch.get(origin);
-
-      // Sanity check: ensure we have an app launch time for the app
-      // corresponding to this performance mark.
-      if (!appLaunchTime) {
-        return;
-      }
-
-      let time = epoch - appLaunchTime;
-      let eventName = 'app_startup_time_' + name;
-
-      // Events based on performance marks are for telemetry only, they are
-      // not displayed in the HUD front end.
-      target._logHistogram({name: eventName, value: time});
-
-      memoryWatcher.front(target).residentUnique().then(value => {
-        // bug 1215277, need 'v2' for app-memory histograms
-        eventName = 'app_memory_' + name + '_v2';
-        target._logHistogram({name: eventName, value: value});
-      }, err => {
-        console.error(err);
-      });
-    });
-  },
-
-  untrackTarget(target) {
-    let fronts = this._fronts;
-    if (fronts.has(target)) {
-      fronts.get(target).destroy();
-      fronts.delete(target);
-    }
-  }
-};
-developerHUD.registerWatcher(performanceEntriesWatcher);
-
-/**
- * The Memory Watcher uses devtools actors to track memory usage.
- */
-var memoryWatcher = {
-
-  _client: null,
-  _fronts: new Map(),
-  _timers: new Map(),
-  _watching: {
-    uss: false,
-    appmemory: false,
-    jsobjects: false,
-    jsstrings: false,
-    jsother: false,
-    dom: false,
-    style: false,
-    other: false
-  },
-  _active: false,
-
-  init(client) {
-    this._client = client;
-    let watching = this._watching;
-
-    for (let key in watching) {
-      let category = key;
-      SettingsListener.observe('hud.' + category, false, watch => {
-        watching[category] = watch;
-        this.update();
-      });
-    }
-  },
-
-  update() {
-    let watching = this._watching;
-    let active = watching.appmemory || watching.uss;
-
-    if (this._active) {
-      for (let target of this._fronts.keys()) {
-        if (!watching.appmemory) target.clear({name: 'memory'});
-        if (!watching.uss) target.clear({name: 'uss'});
-        if (!active) clearTimeout(this._timers.get(target));
-      }
-    } else if (active) {
-      for (let target of this._fronts.keys()) {
-        this.measure(target);
-      }
-    }
-    this._active = active;
-  },
-
-  measure(target) {
-    let watch = this._watching;
-    let format = this.formatMemory;
-
-    if (watch.uss) {
-      this.front(target).residentUnique().then(value => {
-        target.update({name: 'uss', value: value}, 'USS: ' + format(value));
-      }, err => {
-        console.error(err);
-      });
-    }
-
-    if (watch.appmemory) {
-      front.measure().then(data => {
-        let total = 0;
-        let details = [];
-
-        function item(name, condition, value) {
-          if (!condition) {
-            return;
-          }
-
-          let v = parseInt(value);
-          total += v;
-          details.push(name + ': ' + format(v));
-        }
-
-        item('JS objects', watch.jsobjects, data.jsObjectsSize);
-        item('JS strings', watch.jsstrings, data.jsStringsSize);
-        item('JS other', watch.jsother, data.jsOtherSize);
-        item('DOM', watch.dom, data.domSize);
-        item('Style', watch.style, data.styleSize);
-        item('Other', watch.other, data.otherSize);
-        // TODO Also count images size (bug #976007).
-
-        target.update({name: 'memory', value: total},
-          'App Memory: ' + format(total) + ' (' + details.join(', ') + ')');
-      }, err => {
-        console.error(err);
-      });
-    }
-
-    let timer = setTimeout(() => this.measure(target), 2000);
-    this._timers.set(target, timer);
-  },
-
-  formatMemory(bytes) {
-    var prefix = ['','K','M','G','T','P','E','Z','Y'];
-    var i = 0;
-    for (; bytes > 1024 && i < prefix.length; ++i) {
-      bytes /= 1024;
-    }
-    return (Math.round(bytes * 100) / 100) + ' ' + prefix[i] + 'B';
-  },
-
-  trackTarget(target) {
-    target.register('uss');
-    target.register('memory');
-    this._fronts.set(target, MemoryFront(this._client, target.actor));
-    if (this._active) {
-      this.measure(target);
-    }
-  },
-
-  untrackTarget(target) {
-    let front = this._fronts.get(target);
-    if (front) {
-      front.destroy();
-      clearTimeout(this._timers.get(target));
-      this._fronts.delete(target);
-      this._timers.delete(target);
-    }
-  },
-
-  front(target) {
-    return this._fronts.get(target);
-  }
-};
-developerHUD.registerWatcher(memoryWatcher);
deleted file mode 100644
--- a/b2g/chrome/content/identity.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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/. */
-
-// This JS shim contains the callbacks to fire DOMRequest events for
-// navigator.pay API within the payment processor's scope.
-
-"use strict";
-
-var { classes: Cc, interfaces: Ci, utils: Cu }  = Components;
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
-                                   "@mozilla.org/childprocessmessagemanager;1",
-                                   "nsIMessageSender");
-
-XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
-                                   "@mozilla.org/uuid-generator;1",
-                                   "nsIUUIDGenerator");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Logger",
-                                  "resource://gre/modules/identity/LogUtils.jsm");
-
-function log(...aMessageArgs) {
-  Logger.log.apply(Logger, ["injected identity.js"].concat(aMessageArgs));
-}
-
-log("\n\n======================= identity.js =======================\n\n");
-
-// This script may be injected more than once into an iframe.
-// It's hard to do this with |const| like we should, so use var instead.
-if (typeof kIdentityJSLoaded === 'undefined') {
-  var kIdentityDelegateWatch = "identity-delegate-watch";
-  var kIdentityDelegateRequest = "identity-delegate-request";
-  var kIdentityDelegateLogout = "identity-delegate-logout";
-  var kIdentityDelegateReady = "identity-delegate-ready";
-  var kIdentityDelegateFinished = "identity-delegate-finished";
-  var kIdentityControllerDoMethod = "identity-controller-doMethod";
-  var kIdentktyJSLoaded = true;
-}
-
-var showUI = false;
-var options = {};
-var isLoaded = false;
-var func = null;
-
-/*
- * Message back to the SignInToWebsite pipe.  Message should be an
- * object with the following keys:
- *
- *   method:             one of 'login', 'logout', 'ready'
- *   assertion:          optional assertion
- */
-function identityCall(message) {
-  if (options._internal) {
-    message._internal = options._internal;
-  }
-  sendAsyncMessage(kIdentityControllerDoMethod, message);
-}
-
-/*
- * To close the dialog, we first tell the gecko SignInToWebsite manager that it
- * can clean up.  Then we tell the gaia component that we are finished.  It is
- * necessary to notify gecko first, so that the message can be sent before gaia
- * destroys our context.
- */
-function closeIdentityDialog() {
-  // tell gecko we're done.
-  func = null; options = null;
-  sendAsyncMessage(kIdentityDelegateFinished);
-}
-
-/*
- * doInternalWatch - call the internal.watch api and relay the results
- * up to the controller.
- */
-function doInternalWatch() {
-  log("doInternalWatch:", options, isLoaded);
-  if (options && isLoaded) {
-    let BrowserID = content.wrappedJSObject.BrowserID;
-    BrowserID.internal.watch(function(aParams, aInternalParams) {
-        identityCall(aParams);
-        if (aParams.method === "ready") {
-          closeIdentityDialog();
-        }
-      },
-      JSON.stringify(options),
-      function(...things) {
-        // internal watch log callback
-        log("(watch) internal: ", things);
-      }
-    );
-  }
-}
-
-function doInternalRequest() {
-  log("doInternalRequest:", options && isLoaded);
-  if (options && isLoaded) {
-    var stringifiedOptions = JSON.stringify(options);
-    content.wrappedJSObject.BrowserID.internal.get(
-      options.origin,
-      function(assertion, internalParams) {
-        internalParams = internalParams || {};
-        if (assertion) {
-          identityCall({
-            method: 'login',
-            assertion: assertion,
-            _internalParams: internalParams});
-        } else {
-          identityCall({
-            method: 'cancel'
-          });
-        }
-        closeIdentityDialog();
-      },
-      stringifiedOptions);
-  }
-}
-function doInternalLogout(aOptions) {
-  log("doInternalLogout:", (options && isLoaded));
-  if (options && isLoaded) {
-    let BrowserID = content.wrappedJSObject.BrowserID;
-    BrowserID.internal.logout(options.origin, function() {
-      identityCall({method:'logout'});
-      closeIdentityDialog();
-    });
-  }
-}
-
-addEventListener("DOMContentLoaded", function(e) {
-  content.addEventListener("load", function(e) {
-    isLoaded = true;
-     // bring da func
-     if (func) func();
-  });
-});
-
-// listen for request
-addMessageListener(kIdentityDelegateRequest, function(aMessage) {
-  log("injected identity.js received", kIdentityDelegateRequest);
-  options = aMessage.json;
-  showUI = true;
-  func = doInternalRequest;
-  func();
-});
-
-// listen for watch
-addMessageListener(kIdentityDelegateWatch, function(aMessage) {
-  log("injected identity.js received", kIdentityDelegateWatch);
-  options = aMessage.json;
-  showUI = false;
-  func = doInternalWatch;
-  func();
-});
-
-// listen for logout
-addMessageListener(kIdentityDelegateLogout, function(aMessage) {
-  log("injected identity.js received", kIdentityDelegateLogout);
-  options = aMessage.json;
-  showUI = false;
-  func = doInternalLogout;
-  func();
-});
deleted file mode 100644
index c982426f2ade2fdb8e56304cdd333e7fd924e668..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 859e98ba64b6621aa74d1998242ece6e22ce2dba..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c51187ed49e128d49b64adabf003fd140411477d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 43379d0e949ccb5b6664f6e230f47d448e723254..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 9da1b5674dbbf78ed3446dac86f43e81f8e687be..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 58e37283a73eff086420d0969544fa8bc5dd7924..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 9f2e4a6e7366abd9123ad34ed8d369c387111fee..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fc153c7314e82e12a75ac2589c63db3344a5eb34..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 8bf9d8e7decc3642be80e0d6dc615c2f50f64a79..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 826e5340843246732f7001c836f4a3ec37681c86..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 980e787310a9a1391715ba8d3b9bd9bfbc2b5b5c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 6daf7cf7188b00fd28c1c8c3a54673b262036a77..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c7837f8229c03de1fcd0c02ef3aa78573e0a69b8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fd64f969724698d9694b4effceb3896aaeaa56ac..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index b965b73d55b725a4b69c2a5620b761e7435f5ab1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index c601ec80ba7c2321811ac11a28c29afbdfb1c489..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 5de342bda53b604fe2413c8e769e7bbf14e70dc0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/b2g/chrome/content/netError.css
+++ /dev/null
@@ -1,131 +0,0 @@
-/* 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/. */
-
-/*
- *  This defines the look-and-feel styling of the error pages.
- *  (see: netError.xhtml)
- *
- *  Original styling by William Price <bugzilla@mob.rice.edu>
- *  Updated for mobile by: Wes Johnston <wjohnston@mozilla.com>
- */
-
-body {
-  margin: 0;
-  padding: 0 8px 8px;
-  font-family: "Nokia Sans", Tahoma, sans-serif !important;
-}
-
-h1 {
-  font-size: 22px;
-}
-
-h2 {
-  font-size: 16px;
-}
-
-ul {
-  margin: 0px;
-  padding: 0px 0px 0px 1em;
-}
-
-li {
-  margin: 0px;
-  padding: 8px 0px;
-}
-
-#errorPage {
-  background-color: #CEE6F4;
-}
-
-#errorPage.certerror {
-  background-color: #EFD400;
-}
-
-#errorPage.blockedsite {
-  background-color: #BF0000;
-}
-
-#errorTitle {
-  background: url("chrome://b2g/content/images/errorpage-warning.png") left center no-repeat;
-  /* Scaled by .666 of their actual size */
-  background-size: 40px 40px;
-  background-origin: content-box;
-  min-height: 60px;
-  margin-left: auto;
-  margin-right: auto;
-  max-width: 500px;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-#errorPage.certerror #errorTitle {
-  background-image: url("chrome://b2g/content/images/errorpage-larry-black.png");
-}
-
-#errorPage.blockedsite #errorTitle {
-  background-image: url("chrome://b2g/content/images/errorpage-larry-white.png");
-  color: white;
-}
-
-.errorTitleText {
-  padding: 0px 0px 0px 50px;
-  display: inline-block;
-  vertical-align: middle
-}
-
-#errorPageContainer {
-  background-color: white;
-  border: 1px solid #999999;
-  border-radius: 6px;
-  padding: 6px 20px 20px;
-  font-size: 14px;
-  max-width: 500px;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-#errorShortDesc > p:empty {
-  display: none;
-}
-
-#errorShortDesc > p {
-  overflow: auto;
-  border-bottom: 1px solid #999999;
-  padding-bottom: 1em;
-}
-
-#errorPage.blockedsite #errorShortDesc > p {
-  font-weight: bold;
-  border-bottom: none;
-  padding-bottom: 0px;
-}
-
-#securityOverrideDiv {
-  padding-top: 10px;
-}
-
-div[collapsed] {
-  padding-left: 15px;
-  background-image: url("chrome://b2g/content/images/arrowright-16.png");
-  background-size: 11px 11px;
-  background-repeat: no-repeat;
-  background-position: left 0.3em;
-}
-
-div[collapsed="true"] {
-  background-image: url("chrome://b2g/content/images/arrowright-16.png");
-}
-
-div[collapsed="false"] {
-  background-image: url("chrome://b2g/content/images/arrowdown-16.png");
-}
-
-div[collapsed="true"] > p,
-div[collapsed="true"] > div {
-  display: none;
-}
-
-button {
-  padding: 0.3em !important;
-}
deleted file mode 100644
--- a/b2g/chrome/content/screen.js
+++ /dev/null
@@ -1,276 +0,0 @@
-// screen.js:
-// Set the screen size, pixel density and scaling of the b2g client screen
-// based on the --screen command-line option, if there is one.
-// 
-// TODO: support multiple device pixels per CSS pixel
-// 
-
-var browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
-var isMulet = "ResponsiveUI" in browserWindow;
-Cu.import("resource://gre/modules/GlobalSimulatorScreen.jsm");
-
-window.addEventListener('ContentStart', onStart);
-window.addEventListener('SafeModeStart', onStart);
-
-// We do this on ContentStart and SafeModeStart because querying the
-// displayDPI fails otherwise.
-function onStart() {
-  // This is the toplevel <window> element
-  let shell = document.getElementById('shell');
-
-  // The <browser> element inside it
-  let browser = document.getElementById('systemapp');
-
-  // Figure out the native resolution of the screen
-  let windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Components.interfaces.nsIDOMWindowUtils);
-  let hostDPI = windowUtils.displayDPI;
-
-  let DEFAULT_SCREEN = '320x480';
-
-  // This is a somewhat random selection of named screens.
-  // Add more to this list when we support more hardware.
-  // Data from: http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density
-  let screens = {
-    iphone: {
-      name: 'Apple iPhone', width:320, height:480,  dpi:163
-    },
-    ipad: {
-      name: 'Apple iPad', width:1024, height:768,  dpi:132
-    },
-    nexus_s: {
-      name: 'Samsung Nexus S', width:480, height:800, dpi:235
-    },
-    galaxy_s2: {
-      name: 'Samsung Galaxy SII (I9100)', width:480, height:800, dpi:219
-    },
-    galaxy_nexus: {
-      name: 'Samsung Galaxy Nexus', width:720, height:1280, dpi:316
-    },
-    galaxy_tab: {
-      name: 'Samsung Galaxy Tab 10.1', width:800, height:1280, dpi:149
-    },
-    wildfire: {
-      name: 'HTC Wildfire', width:240, height:320, dpi:125
-    },
-    tattoo: {
-      name: 'HTC Tattoo', width:240, height:320, dpi:143
-    },
-    salsa: {
-      name: 'HTC Salsa', width:320, height:480, dpi:170
-    },
-    chacha: {
-      name: 'HTC ChaCha', width:320, height:480, dpi:222
-    },
-  };
-
-  // Get the command line arguments that were passed to the b2g client
-  let args;
-  try {
-    let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports);
-    args = service.wrappedJSObject.cmdLine;
-  } catch(e) {}
-
-  let screenarg = null;
-
-  // Get the --screen argument from the command line
-  try {
-    if (args) {
-      screenarg = args.handleFlagWithParam('screen', false);
-    }
-
-    // Override default screen size with a pref
-    if (screenarg === null && Services.prefs.prefHasUserValue('b2g.screen.size')) {
-      screenarg = Services.prefs.getCharPref('b2g.screen.size');
-    }
-
-    // If there isn't one, use the default screen
-    if (screenarg === null)
-      screenarg = DEFAULT_SCREEN;
-
-    // With no value, tell the user how to use it
-    if (screenarg == '')
-      usage();
-  }
-  catch(e) {
-    // If getting the argument value fails, its an error
-    usage();
-  }
-  
-  // Special case --screen=full goes into fullscreen mode
-  if (screenarg === 'full') {
-    shell.setAttribute('sizemode', 'fullscreen');
-    return;
-  } 
-
-  let width, height, ratio = 1.0;
-  let lastResizedWidth;
-
-  if (screenarg in screens) {
-    // If this is a named screen, get its data
-    let screen = screens[screenarg];
-    width = screen.width;
-    height = screen.height;
-    ratio = screen.ratio;
-  } else {
-    // Otherwise, parse the resolution and density from the --screen value.
-    // The supported syntax is WIDTHxHEIGHT[@DPI]
-    let match = screenarg.match(/^(\d+)x(\d+)(@(\d+(\.\d+)?))?$/);
-    
-    // Display usage information on syntax errors
-    if (match == null)
-      usage();
-    
-    // Convert strings to integers
-    width = parseInt(match[1], 10);
-    height = parseInt(match[2], 10);
-    if (match[4])
-      ratio = parseFloat(match[4], 10);
-
-    // If any of the values came out 0 or NaN or undefined, display usage
-    if (!width || !height || !ratio) {
-      usage();
-    }
-  }
-
-  Services.prefs.setCharPref('layout.css.devPixelsPerPx',
-                             ratio == 1 ? -1 : ratio);
-  let defaultOrientation = width < height ? 'portrait' : 'landscape';
-  GlobalSimulatorScreen.mozOrientation = GlobalSimulatorScreen.screenOrientation = defaultOrientation;
-
-  function resize() {
-    GlobalSimulatorScreen.width = width;
-    GlobalSimulatorScreen.height = height;
-
-    // Set the window width and height to desired size plus chrome
-    // Include the size of the toolbox displayed under the system app
-    let controls = document.getElementById('controls');
-    let controlsHeight = controls ? controls.getBoundingClientRect().height : 0;
-
-    if (isMulet) {
-      let tab = browserWindow.gBrowser.selectedTab;
-      let responsive = ResponsiveUIManager.getResponsiveUIForTab(tab);
-      responsive.setSize(width + 16*2,
-                         height + controlsHeight + 61);
-    } else {
-      let chromewidth = window.outerWidth - window.innerWidth;
-      let chromeheight = window.outerHeight - window.innerHeight + controlsHeight;
-
-      if (lastResizedWidth == width) {
-        return;
-      }
-      lastResizedWidth = width;
-
-      window.resizeTo(width + chromewidth,
-                      height + chromeheight);
-    }
-
-    let frameWidth = width, frameHeight = height;
-
-    // If the current app doesn't supports the current screen orientation
-    // still resize the window, but rotate its frame so that
-    // it is displayed rotated on the side
-    let shouldFlip = GlobalSimulatorScreen.mozOrientation != GlobalSimulatorScreen.screenOrientation;
-
-    if (shouldFlip) {
-      frameWidth = height;
-      frameHeight = width;
-    }
-
-    // Set the browser element to the full unscaled size of the screen
-    let style = browser.style;
-    style.transform = '';
-    style.height = 'calc(100% - ' + controlsHeight + 'px)';
-    style.bottom = controlsHeight;
-
-    style.width = frameWidth + "px";
-    style.height = frameHeight + "px";
-
-    if (shouldFlip) {
-      // Display the system app with a 90° clockwise rotation
-      let shift = Math.floor(Math.abs(frameWidth - frameHeight) / 2);
-      style.transform +=
-        ' rotate(0.25turn) translate(-' + shift + 'px, -' + shift + 'px)';
-    }
-  }
-
-  // Resize on startup
-  resize();
-
-  // Catch manual resizes to update the internal device size.
-  window.onresize = function() {
-    let controls = document.getElementById('controls');
-    let controlsHeight = controls ? controls.getBoundingClientRect().height : 0;
-
-    width = window.innerWidth;
-    height = window.innerHeight - controlsHeight;
-
-    queueResize();
-  };
-
-  // Then resize on each rotation button click,
-  // or when the system app lock/unlock the orientation
-  Services.obs.addObserver(function orientationChangeListener(subject) {
-    let screen = subject.wrappedJSObject;
-    let { mozOrientation, screenOrientation } = screen;
-
-    // If we have an orientation different than the current one,
-    // we switch the sizes
-    if (screenOrientation != defaultOrientation) {
-      let w = width;
-      width = height;
-      height = w;
-    }
-    defaultOrientation = screenOrientation;
-
-    queueResize();
-  }, 'simulator-adjust-window-size');
-
-  // Queue resize request in order to prevent race and slowdowns
-  // by requesting resize multiple times per loop
-  let resizeTimeout;
-  function queueResize() {
-    if (resizeTimeout) {
-      clearTimeout(resizeTimeout);
-    }
-    resizeTimeout = setTimeout(function () {
-      resizeTimeout = null;
-      resize();
-    }, 0);
-  }
-
-  // A utility function like console.log() for printing to the terminal window
-  // Uses dump(), but enables it first, if necessary
-  function print() {
-    let dump_enabled =
-      Services.prefs.getBoolPref('browser.dom.window.dump.enabled');
-
-    if (!dump_enabled)
-      Services.prefs.setBoolPref('browser.dom.window.dump.enabled', true);
-
-    dump(Array.prototype.join.call(arguments, ' ') + '\n');
-
-    if (!dump_enabled) 
-      Services.prefs.setBoolPref('browser.dom.window.dump.enabled', false);
-  }
-
-  // Print usage info for --screen and exit
-  function usage() {
-    // Documentation for the --screen argument
-    let msg = 
-      'The --screen argument specifies the desired resolution and\n' +
-      'pixel density of the simulated device screen. Use it like this:\n' +
-      '\t--screen=WIDTHxHEIGHT\t\t\t// E.g.: --screen=320x480\n' +
-      '\t--screen=WIDTHxHEIGHT@DOTS_PER_INCH\t// E.g.: --screen=480x800@250\n' +
-      '\t--screen=full\t\t\t\t// run in fullscreen mode\n' +
-      '\nYou can also specify certain device names:\n';
-    for(let p in screens)
-      msg += '\t--screen=' + p + '\t// ' + screens[p].name + '\n';
-
-    // Display the usage message
-    print(msg);
-
-    // Exit the b2g client
-    Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
-  }
-}
deleted file mode 100644
--- a/b2g/chrome/content/settings.js
+++ /dev/null
@@ -1,673 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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/. */
-
-"use strict";
-
-window.performance.mark('gecko-settings-loadstart');
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-// The load order is important here SettingsRequestManager _must_ be loaded
-// prior to using SettingsListener otherwise there is a race in acquiring the
-// lock and fulfilling it. If we ever move SettingsListener or this file down in
-// the load order of shell.html things will likely break.
-Cu.import('resource://gre/modules/SettingsRequestManager.jsm');
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/AppConstants.jsm');
-
-const isGonk = AppConstants.platform === 'gonk';
-
-if (isGonk) {
-  XPCOMUtils.defineLazyGetter(this, "libcutils", function () {
-    Cu.import("resource://gre/modules/systemlibs.js");
-    return libcutils;
-  });
-}
-
-XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
-                                   "@mozilla.org/uuid-generator;1",
-                                   "nsIUUIDGenerator");
-
-// Once Bug 731746 - Allow chrome JS object to implement nsIDOMEventTarget
-// is resolved this helper could be removed.
-var SettingsListener = {
-  _callbacks: {},
-
-  init: function sl_init() {
-    if ('mozSettings' in navigator && navigator.mozSettings) {
-      navigator.mozSettings.onsettingchange = this.onchange.bind(this);
-    }
-  },
-
-  onchange: function sl_onchange(evt) {
-    var callback = this._callbacks[evt.settingName];
-    if (callback) {
-      callback(evt.settingValue);
-    }
-  },
-
-  observe: function sl_observe(name, defaultValue, callback) {
-    var settings = window.navigator.mozSettings;
-    if (!settings) {
-      window.setTimeout(function() { callback(defaultValue); });
-      return;
-    }
-
-    if (!callback || typeof callback !== 'function') {
-      throw new Error('Callback is not a function');
-    }
-
-    var req = settings.createLock().get(name);
-    req.addEventListener('success', (function onsuccess() {
-      callback(typeof(req.result[name]) != 'undefined' ?
-        req.result[name] : defaultValue);
-    }));
-
-    this._callbacks[name] = callback;
-  }
-};
-
-SettingsListener.init();
-
-// =================== Mono Audio ======================
-
-SettingsListener.observe('accessibility.monoaudio.enable', false, function(value) {
-  Services.prefs.setBoolPref('accessibility.monoaudio.enable', value);
-});
-
-// =================== Console ======================
-
-SettingsListener.observe('debug.console.enabled', true, function(value) {
-  Services.prefs.setBoolPref('consoleservice.enabled', value);
-  Services.prefs.setBoolPref('layout.css.report_errors', value);
-});
-
-SettingsListener.observe('homescreen.manifestURL', 'Sentinel Value' , function(value) {
-  Services.prefs.setCharPref('dom.mozApps.homescreenURL', value);
-});
-
-// =================== Languages ====================
-SettingsListener.observe('language.current', 'en-US', function(value) {
-  Services.prefs.setCharPref('general.useragent.locale', value);
-
-  let prefName = 'intl.accept_languages';
-  let defaultBranch = Services.prefs.getDefaultBranch(null);
-
-  let intl = '';
-  try {
-    intl = defaultBranch.getComplexValue(prefName,
-                                         Ci.nsIPrefLocalizedString).data;
-  } catch(e) {}
-
-  // Bug 830782 - Homescreen is in English instead of selected locale after
-  // the first run experience.
-  // In order to ensure the current intl value is reflected on the child
-  // process let's always write a user value, even if this one match the
-  // current localized pref value.
-  if (!((new RegExp('^' + value + '[^a-z-_] *[,;]?', 'i')).test(intl))) {
-    value = value + ', ' + intl;
-  } else {
-    value = intl;
-  }
-  Services.prefs.setCharPref(prefName, value);
-
-  if (shell.hasStarted() == false) {
-    shell.bootstrap();
-  }
-});
-
-// =================== RIL ====================
-(function RILSettingsToPrefs() {
-  // DSDS default service IDs
-  ['mms', 'sms', 'telephony'].forEach(function(key) {
-    SettingsListener.observe('ril.' + key + '.defaultServiceId', 0,
-                             function(value) {
-      if (value != null) {
-        Services.prefs.setIntPref('dom.' + key + '.defaultServiceId', value);
-      }
-    });
-  });
-})();
-
-//=================== DeviceInfo ====================
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/ctypes.jsm');
-(function DeviceInfoToSettings() {
-  // MOZ_B2G_VERSION is set in b2g/confvars.sh, and is output as a #define value
-  // from configure.in, defaults to 1.0.0 if this value is not exist.
-  let os_version = AppConstants.MOZ_B2G_VERSION;
-  let os_name = AppConstants.MOZ_B2G_OS_NAME;
-
-  let appInfo = Cc["@mozilla.org/xre/app-info;1"]
-                  .getService(Ci.nsIXULAppInfo);
-
-  // Get the hardware info and firmware revision from device properties.
-  let hardware_info = null;
-  let firmware_revision = null;
-  let product_manufacturer = null;
-  let product_model = null;
-  let product_device = null;
-  let build_number = null;
-  if (isGonk) {
-    hardware_info = libcutils.property_get('ro.hardware');
-    firmware_revision = libcutils.property_get('ro.firmware_revision');
-    product_manufacturer = libcutils.property_get('ro.product.manufacturer');
-    product_model = libcutils.property_get('ro.product.model');
-    product_device = libcutils.property_get('ro.product.device');
-    build_number = libcutils.property_get('ro.build.version.incremental');
-  }
-
-  // Populate deviceinfo settings,
-  // copying any existing deviceinfo.os into deviceinfo.previous_os
-  let lock = window.navigator.mozSettings.createLock();
-  let req = lock.get('deviceinfo.os');
-  req.onsuccess = req.onerror = () => {
-    let previous_os = req.result && req.result['deviceinfo.os'] || '';
-    let software = os_name + ' ' + os_version;
-    let setting = {
-      'deviceinfo.build_number': build_number,
-      'deviceinfo.os': os_version,
-      'deviceinfo.previous_os': previous_os,
-      'deviceinfo.software': software,
-      'deviceinfo.platform_version': appInfo.platformVersion,
-      'deviceinfo.platform_build_id': appInfo.platformBuildID,
-      'deviceinfo.hardware': hardware_info,
-      'deviceinfo.firmware_revision': firmware_revision,
-      'deviceinfo.product_manufacturer': product_manufacturer,
-      'deviceinfo.product_model': product_model,
-      'deviceinfo.product_device': product_device
-    }
-    lock.set(setting);
-  }
-})();
-
-// =================== DevTools ====================
-
-var developerHUD;
-SettingsListener.observe('devtools.overlay', false, (value) => {
-  if (value) {
-    if (!developerHUD) {
-      let scope = {};
-      Services.scriptloader.loadSubScript('chrome://b2g/content/devtools/hud.js', scope);
-      developerHUD = scope.developerHUD;
-    }
-    developerHUD.init();
-  } else {
-    if (developerHUD) {
-      developerHUD.uninit();
-    }
-  }
-});
-
-if (isGonk) {
-  var LogShake;
-  (function() {
-    let scope = {};
-    Cu.import('resource://gre/modules/LogShake.jsm', scope);
-    LogShake = scope.LogShake;
-    LogShake.init();
-  })();
-
-  SettingsListener.observe('devtools.logshake.enabled', false, value => {
-    if (value) {
-      LogShake.enableDeviceMotionListener();
-    } else {
-      LogShake.disableDeviceMotionListener();
-    }
-  });
-
-  SettingsListener.observe('devtools.logshake.qa_enabled', false, value => {
-    if (value) {
-      LogShake.enableQAMode();
-    } else {
-      LogShake.disableQAMode();
-    }
-  });
-}
-
-// =================== Device Storage ====================
-SettingsListener.observe('device.storage.writable.name', 'sdcard', function(value) {
-  if (Services.prefs.getPrefType('device.storage.writable.name') != Ci.nsIPrefBranch.PREF_STRING) {
-    // We clear the pref because it used to be erroneously written as a bool
-    // and we need to clear it before we can change it to have the correct type.
-    Services.prefs.clearUserPref('device.storage.writable.name');
-  }
-  Services.prefs.setCharPref('device.storage.writable.name', value);
-});
-
-// =================== Privacy ====================
-SettingsListener.observe('privacy.donottrackheader.value', 1, function(value) {
-  Services.prefs.setIntPref('privacy.donottrackheader.value', value);
-  // If the user specifically disallows tracking, we set the value of
-  // app.update.custom (update tracking ID) to an empty string.
-  if (value == 1) {
-    Services.prefs.setCharPref('app.update.custom', '');
-    return;
-  }
-  // Otherwise, we assure that the update tracking ID exists.
-  setUpdateTrackingId();
-});
-
-// =================== Crash Reporting ====================
-SettingsListener.observe('app.reportCrashes', 'ask', function(value) {
-  if (value == 'always') {
-    Services.prefs.setBoolPref('app.reportCrashes', true);
-  } else if (value == 'never') {
-    Services.prefs.setBoolPref('app.reportCrashes', false);
-  } else {
-    Services.prefs.clearUserPref('app.reportCrashes');
-  }
-  // This preference is consulted during startup.
-  Services.prefs.savePrefFile(null);
-});
-
-// ================ Updates ================
-/**
- * For tracking purposes some partners require us to add an UUID to the
- * update URL. The update tracking ID will be an empty string if the
- * do-not-track feature specifically disallows tracking and it is reseted
- * to a different ID if the do-not-track value changes from disallow to allow.
- */
-function setUpdateTrackingId() {
-  try {
-    let dntEnabled = Services.prefs.getBoolPref('privacy.donottrackheader.enabled');
-    let dntValue =  Services.prefs.getIntPref('privacy.donottrackheader.value');
-    // If the user specifically decides to disallow tracking (1), we just bail out.
-    if (dntEnabled && (dntValue == 1)) {
-      return;
-    }
-
-    let trackingId =
-      Services.prefs.getPrefType('app.update.custom') ==
-      Ci.nsIPrefBranch.PREF_STRING &&
-      Services.prefs.getCharPref('app.update.custom');
-
-    // If there is no previous registered tracking ID, we generate a new one.
-    // This should only happen on first usage or after changing the
-    // do-not-track value from disallow to allow.
-    if (!trackingId) {
-      trackingId = uuidgen.generateUUID().toString().replace(/[{}]/g, "");
-      Services.prefs.setCharPref('app.update.custom', trackingId);
-    }
-  } catch(e) {
-    dump('Error getting tracking ID ' + e + '\n');
-  }
-}
-setUpdateTrackingId();
-
-(function syncUpdatePrefs() {
-  // The update service reads the prefs from the default branch. This is by
-  // design, as explained in bug 302721 comment 43. If we are to successfully
-  // modify them, that's where we need to make our changes.
-  let defaultBranch = Services.prefs.getDefaultBranch(null);
-
-  function syncPrefDefault(prefName) {
-    // The pref value at boot-time will serve as default for the setting.
-    let defaultValue = defaultBranch.getCharPref(prefName);
-    let defaultSetting = {};
-    defaultSetting[prefName] = defaultValue;
-
-    // We back up that value in order to detect pref changes across reboots.
-    // Such a change can happen e.g. when the user installs an OTA update that
-    // changes the update URL format.
-    let backupName = prefName + '.old';
-    try {
-      // Everything relies on the comparison below: When pushing a new Gecko
-      // that changes app.update.url or app.update.channel, we overwrite any
-      // existing setting with the new pref value.
-      let backupValue = Services.prefs.getCharPref(backupName);
-      if (defaultValue !== backupValue) {
-        // If the pref has changed since our last backup, overwrite the setting.
-        navigator.mozSettings.createLock().set(defaultSetting);
-      }
-    } catch(e) {
-      // There was no backup: Overwrite the setting and create a backup below.
-      navigator.mozSettings.createLock().set(defaultSetting);
-    }
-
-    // Initialize or update the backup value.
-    Services.prefs.setCharPref(backupName, defaultValue);
-
-    // Propagate setting changes to the pref.
-    SettingsListener.observe(prefName, defaultValue, value => {
-      if (!value) {
-        // If the setting value is invalid, reset it to its default.
-        navigator.mozSettings.createLock().set(defaultSetting);
-        return;
-      }
-      // Here we will overwrite the pref with the setting value.
-      defaultBranch.setCharPref(prefName, value);
-    });
-  }
-
-  syncPrefDefault('app.update.url');
-  syncPrefDefault('app.update.channel');
-})();
-
-// ================ Debug ================
-(function Composer2DSettingToPref() {
-  //layers.composer.enabled can be enabled in three ways
-  //In order of precedence they are:
-  //
-  //1. mozSettings "layers.composer.enabled"
-  //2. a gecko pref "layers.composer.enabled"
-  //3. presence of ro.display.colorfill at the Gonk level
-
-  var req = navigator.mozSettings.createLock().get('layers.composer2d.enabled');
-  req.onsuccess = function() {
-    if (typeof(req.result['layers.composer2d.enabled']) === 'undefined') {
-      var enabled = false;
-      if (Services.prefs.getPrefType('layers.composer2d.enabled') == Ci.nsIPrefBranch.PREF_BOOL) {
-        enabled = Services.prefs.getBoolPref('layers.composer2d.enabled');
-      } else if (isGonk) {
-        let androidVersion = libcutils.property_get("ro.build.version.sdk");
-        if (androidVersion >= 17 ) {
-          enabled = true;
-        } else {
-          enabled = (libcutils.property_get('ro.display.colorfill') === '1');
-        }
-      }
-      navigator.mozSettings.createLock().set({'layers.composer2d.enabled': enabled });
-    }
-
-    SettingsListener.observe("layers.composer2d.enabled", true, function(value) {
-      Services.prefs.setBoolPref("layers.composer2d.enabled", value);
-    });
-  };
-  req.onerror = function() {
-    dump("Error configuring layers.composer2d.enabled setting");
-  };
-
-})();
-
-// ================ Accessibility ============
-(function setupAccessibility() {
-  let accessibilityScope = {};
-  SettingsListener.observe("accessibility.screenreader", false, function(value) {
-    if (!value) {
-      return;
-    }
-    if (!('AccessFu' in accessibilityScope)) {
-      Cu.import('resource://gre/modules/accessibility/AccessFu.jsm',
-                accessibilityScope);
-      accessibilityScope.AccessFu.attach(window);
-    }
-  });
-})();
-
-// ================ Theming ============
-(function themingSettingsListener() {
-  let themingPrefs = ['ui.menu', 'ui.menutext', 'ui.infobackground', 'ui.infotext',
-                      'ui.window', 'ui.windowtext', 'ui.highlight'];
-
-  themingPrefs.forEach(function(pref) {
-    SettingsListener.observe('gaia.' + pref, null, function(value) {
-      if (value) {
-        Services.prefs.setCharPref(pref, value);
-      }
-    });
-  });
-})();
-
-// =================== Telemetry  ======================
-(function setupTelemetrySettings() {
-  let gaiaSettingName = 'debug.performance_data.shared';
-  let geckoPrefName = 'toolkit.telemetry.enabled';
-  SettingsListener.observe(gaiaSettingName, null, function(value) {
-    if (value !== null) {
-      // Gaia setting has been set; update Gecko pref to that.
-      Services.prefs.setBoolPref(geckoPrefName, value);
-      return;
-    }
-    // Gaia setting has not been set; set the gaia setting to default.
-    let prefValue = Services.prefs.getBoolPref(geckoPrefName,
-                                               AppConstants.MOZ_TELEMETRY_ON_BY_DEFAULT);
-    let setting = {};
-    setting[gaiaSettingName] = prefValue;
-    window.navigator.mozSettings.createLock().set(setting);
-  });
-})();
-
-// =================== Low-precision buffer ======================
-(function setupLowPrecisionSettings() {
-  // The gaia setting layers.low-precision maps to two gecko prefs
-  SettingsListener.observe('layers.low-precision', null, function(value) {
-    if (value !== null) {
-      // Update gecko from the new Gaia setting
-      Services.prefs.setBoolPref('layers.low-precision-buffer', value);
-      Services.prefs.setBoolPref('layers.progressive-paint', value);
-    } else {
-      // Update gaia setting from gecko value
-      try {
-        let prefValue = Services.prefs.getBoolPref('layers.low-precision-buffer');
-        let setting = { 'layers.low-precision': prefValue };
-        window.navigator.mozSettings.createLock().set(setting);
-      } catch (e) {
-        console.log('Unable to read pref layers.low-precision-buffer: ' + e);
-      }
-    }
-  });
-
-  // The gaia setting layers.low-opacity maps to a string gecko pref (0.5/1.0)
-  SettingsListener.observe('layers.low-opacity', null, function(value) {
-    if (value !== null) {
-      // Update gecko from the new Gaia setting
-      Services.prefs.setCharPref('layers.low-precision-opacity', value ? '0.5' : '1.0');
-    } else {
-      // Update gaia setting from gecko value
-      try {
-        let prefValue = Services.prefs.getCharPref('layers.low-precision-opacity');
-        let setting = { 'layers.low-opacity': (prefValue == '0.5') };
-        window.navigator.mozSettings.createLock().set(setting);
-      } catch (e) {
-        console.log('Unable to read pref layers.low-precision-opacity: ' + e);
-      }
-    }
-  });
-})();
-
-// ======================= Dogfooders FOTA ==========================
-if (AppConstants.MOZ_B2G_RIL) {
-  SettingsListener.observe('debug.performance_data.dogfooding', false,
-    isDogfooder => {
-      if (!isDogfooder) {
-        dump('AUS:Settings: Not a dogfooder!\n');
-        return;
-      }
-
-      if (!('mozTelephony' in navigator)) {
-        dump('AUS:Settings: There is no mozTelephony!\n');
-        return;
-      }
-
-      if (!('mozMobileConnections' in navigator)) {
-        dump('AUS:Settings: There is no mozMobileConnections!\n');
-        return;
-      }
-    });
-}
-
-// =================== Various simple mapping  ======================
-var settingsToObserve = {
-  'accessibility.screenreader_quicknav_modes': {
-    prefName: 'accessibility.accessfu.quicknav_modes',
-    resetToPref: true,
-    defaultValue: ''
-  },
-  'accessibility.screenreader_quicknav_index': {
-    prefName: 'accessibility.accessfu.quicknav_index',
-    resetToPref: true,
-    defaultValue: 0
-  },
-  'app.update.interval': 86400,
-  'apz.overscroll.enabled': true,
-  'browser.safebrowsing.phishing.enabled': true,
-  'browser.safebrowsing.malware.enabled': true,
-  'debug.fps.enabled': {
-    prefName: 'layers.acceleration.draw-fps',
-    defaultValue: false
-  },
-  'debug.log-animations.enabled': {
-    prefName: 'layers.offmainthreadcomposition.log-animations',
-    defaultValue: false
-  },
-  'debug.paint-flashing.enabled': {
-    prefName: 'nglayout.debug.paint_flashing',
-    defaultValue: false
-  },
-  // FIXME: Bug 1185806 - Provide a common device name setting.
-  // Borrow device name from developer's menu to avoid multiple name settings.
-  'devtools.discovery.device': {
-    prefName: 'dom.presentation.device.name',
-    defaultValue: 'Firefox OS'
-  },
-  'devtools.eventlooplag.threshold': 100,
-  'devtools.remote.wifi.visible': {
-    resetToPref: true
-  },
-  'devtools.telemetry.supported_performance_marks': {
-    resetToPref: true
-  },
-
-  'dom.presentation.discovery.enabled': false,
-  'dom.presentation.discoverable': false,
-  'dom.serviceWorkers.testing.enabled': false,
-  'gfx.layerscope.enabled': false,
-  'layers.draw-borders': false,
-  'layers.draw-tile-borders': false,
-  'layers.dump': false,
-  'layers.enable-tiles': AppConstants.platform !== "win",
-  'layers.enable-tiles': true,
-  'layers.effect.invert': false,
-  'layers.effect.grayscale': false,
-  'layers.effect.contrast': '0.0',
-  'layout.display-list.dump': false,
-  'mms.debugging.enabled': false,
-  'network.debugging.enabled': false,
-  'privacy.donottrackheader.enabled': false,
-  'privacy.trackingprotection.enabled': false,
-  'ril.debugging.enabled': false,
-  'ril.radio.disabled': false,
-  'ril.mms.requestReadReport.enabled': {
-    prefName: 'dom.mms.requestReadReport',
-    defaultValue: true
-  },
-  'ril.mms.requestStatusReport.enabled': {
-    prefName: 'dom.mms.requestStatusReport',
-    defaultValue: false
-  },
-  'ril.mms.retrieval_mode': {
-    prefName: 'dom.mms.retrieval_mode',
-    defaultValue: 'manual'
-  },
-  'ril.sms.requestStatusReport.enabled': {
-    prefName: 'dom.sms.requestStatusReport',
-    defaultValue: false
-  },
-  'ril.sms.strict7BitEncoding.enabled': {
-    prefName: 'dom.sms.strict7BitEncoding',
-    defaultValue: false
-  },
-  'ril.sms.maxReadAheadEntries': {
-    prefName: 'dom.sms.maxReadAheadEntries',
-    defaultValue: 7
-  },
-  'services.sync.enabled': {
-    defaultValue: false,
-    notifyChange: true
-  },
-  'ui.touch.radius.leftmm': {
-    resetToPref: true
-  },
-  'ui.touch.radius.topmm': {
-    resetToPref: true
-  },
-  'ui.touch.radius.rightmm': {
-    resetToPref: true
-  },
-  'ui.touch.radius.bottommm': {
-    resetToPref: true
-  },
-  'ui.click_hold_context_menus.delay': {
-    resetToPref: true
-  },
-  'wap.UAProf.tagname': 'x-wap-profile',
-  'wap.UAProf.url': ''
-};
-
-if (AppConstants.MOZ_GRAPHENE) {
-  // Restart required
-  settingsToObserve['layers.async-pan-zoom.enabled'] = false;
-}
-
-function settingObserver(setPref, prefName, setting) {
-  return value => {
-    setPref(prefName, value);
-    if (setting.notifyChange) {
-      SystemAppProxy._sendCustomEvent('mozPrefChromeEvent', {
-        prefName: prefName,
-        value: value
-      });
-    }
-  };
-}
-
-for (let key in settingsToObserve) {
-  let setting = settingsToObserve[key];
-
-  // Allow setting to contain flags redefining prefName and defaultValue.
-  let prefName = setting.prefName || key;
-  let defaultValue = setting.defaultValue;
-  if (defaultValue === undefined) {
-    defaultValue = setting;
-  }
-
-  let prefs = Services.prefs;
-
-  // If requested, reset setting value and defaultValue to the pref value.
-  if (setting.resetToPref) {
-    switch (prefs.getPrefType(prefName)) {
-      case Ci.nsIPrefBranch.PREF_BOOL:
-        defaultValue = prefs.getBoolPref(prefName);
-        break;
-
-      case Ci.nsIPrefBranch.PREF_INT:
-        defaultValue = prefs.getIntPref(prefName);
-        break;
-
-      case Ci.nsIPrefBranch.PREF_STRING:
-        defaultValue = prefs.getCharPref(prefName);
-        break;
-    }
-
-    let setting = {};
-    setting[key] = defaultValue;
-    window.navigator.mozSettings.createLock().set(setting);
-  }
-
-  // Figure out the right setter function for this type of pref.
-  let setPref;
-  switch (typeof defaultValue) {
-    case 'boolean':
-      setPref = prefs.setBoolPref.bind(prefs);
-      break;
-
-    case 'number':
-      setPref = prefs.setIntPref.bind(prefs);
-      break;
-
-    case 'string':
-      setPref = prefs.setCharPref.bind(prefs);
-      break;
-  }
-
-  SettingsListener.observe(key, defaultValue,
-                           settingObserver(setPref, prefName, setting));
-};
deleted file mode 100644
--- a/b2g/chrome/content/shell.css
+++ /dev/null
@@ -1,81 +0,0 @@
-/* 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/. */
-
-html {
-  background: black;
-  overflow: hidden;
-  width: 100%;
-  height: 100%;
-  padding: 0 !important;
-}
-body {
-  margin: 0;
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-}
-iframe {
-  overflow: hidden;
-  height: 100%;
-  width: 100%;
-  border: none;
-  position: absolute;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 1;
-  -moz-user-select: none;
-}
-
-%ifdef MOZ_GRAPHENE
-
-body.content-loaded > #installing {
-  display: none;
-}
-
-#installing {
-  z-index: 2;
-  position: absolute;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  width: 100%;
-  height: 100%;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  background-color: #F1C40F;
-  color: #FFF;
-}
-
-.throbber {
-  width: 3px;
-  height: 3px;
-  border-radius: 100px;
-  background-color: #FFF;
-  animation-name: throbber;
-  animation-duration: 1500ms;
-  animation-iteration-count: infinite;
-  animation-timing-function: linear;
-}
-
-#titlebar-buttonbox {
-  margin: 6px 7px;
-  -moz-appearance: -moz-window-button-box;
-}
-
-@keyframes throbber{
-  from {
-    transform: scale(0);
-    opacity: 0.4;
-  }
-  to {
-    transform: scale(400);
-    opacity: 0;
-  }
-}
-
-%endif
deleted file mode 100644
--- a/b2g/chrome/content/shell.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!-- 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/.  -->
-
-<html xmlns="http://www.w3.org/1999/xhtml"
-      id="shell"
-      windowtype="navigator:browser"
-#ifdef ANDROID
-      sizemode="fullscreen"
-#endif
-#ifdef MOZ_GRAPHENE
-      macanimationtype="document"
-      fullscreenbutton="true"
-      chromemargin="0,0,0,0"
-#endif
-      >
-
-<head>
-  <link rel="stylesheet" href="shell.css" type="text/css">
-  <script type="text/javascript">
-  <!-- Add raptor performance marker -->
-  window.performance.mark('gecko-shell-html-load');
-  </script>
-  <script type="application/javascript"
-          src="chrome://b2g/content/settings.js"> </script>
-  <script type="application/javascript"
-          src="chrome://b2g/content/shell.js"> </script>
-
-#ifndef ANDROID
-#ifndef MOZ_GRAPHENE
-  <!-- various task that has to happen only on desktop -->
-  <script type="application/javascript"
-          src="chrome://b2g/content/desktop.js"> </script>
-  <!-- this script handles the screen argument for desktop builds -->
-  <script type="application/javascript"
-          src="chrome://b2g/content/screen.js"> </script>
-#endif
-#else
-  <!-- this file is only loaded on Gonk to manage ADB state -->
-  <script type="application/javascript"
-          src="chrome://b2g/content/devtools/adb.js"> </script>
-#endif
-  <!-- manages DevTools server state -->
-  <script type="application/javascript"
-          src="chrome://b2g/content/devtools/debugger.js"> </script>
-</head>
-  <body id="container">
-#ifndef MOZ_GRAPHENE
-#ifdef MOZ_WIDGET_COCOA
-    <!--
-     If the document is empty at startup, we don't display the window
-     at all on Mac OS...
-    -->
-    <h1 id="placeholder">wtf mac os!</h1>
-#endif
-#else
-    <div id="titlebar-buttonbox"></div>
-    <div id="installing">
-      <div class="throbber"></div>
-      <div class="message"></div>
-    </div>
-#endif
-    <!-- The html:iframe containing the UI is created here. -->
-  </body>
-</html>
deleted file mode 100644
--- a/b2g/chrome/content/shell.js
+++ /dev/null
@@ -1,1298 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- /
-/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
-/* 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/. */
-
-window.performance.mark('gecko-shell-loadstart');
-
-Cu.import('resource://gre/modules/NotificationDB.jsm');
-Cu.import('resource://gre/modules/UserAgentOverrides.jsm');
-Cu.import('resource://gre/modules/Keyboard.jsm');
-Cu.import('resource://gre/modules/ErrorPage.jsm');
-Cu.import('resource://gre/modules/AlertsHelper.jsm');
-Cu.import('resource://gre/modules/SystemUpdateService.jsm');
-
-if (isGonk) {
-  Cu.import('resource://gre/modules/ResourceStatsService.jsm');
-}
-
-// Identity
-Cu.import('resource://gre/modules/SignInToWebsite.jsm');
-SignInToWebsiteController.init();
-
-Cu.import('resource://gre/modules/FxAccountsMgmtService.jsm');
-Cu.import('resource://gre/modules/DownloadsAPI.jsm');
-Cu.import('resource://gre/modules/PresentationDeviceInfoManager.jsm');
-Cu.import('resource://gre/modules/AboutServiceWorkers.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
-                                  "resource://gre/modules/SystemAppProxy.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Screenshot",
-                                  "resource://gre/modules/Screenshot.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(Services, 'env',
-                                   '@mozilla.org/process/environment;1',
-                                   'nsIEnvironment');
-
-XPCOMUtils.defineLazyServiceGetter(Services, 'ss',
-                                   '@mozilla.org/content/style-sheet-service;1',
-                                   'nsIStyleSheetService');
-
-XPCOMUtils.defineLazyServiceGetter(this, 'gSystemMessenger',
-                                   '@mozilla.org/system-message-internal;1',
-                                   'nsISystemMessagesInternal');
-
-XPCOMUtils.defineLazyGetter(this, "ppmm", function() {
-  return Cc["@mozilla.org/parentprocessmessagemanager;1"]
-         .getService(Ci.nsIMessageListenerManager);
-});
-
-if (isGonk) {
-  XPCOMUtils.defineLazyGetter(this, "libcutils", function () {
-    Cu.import("resource://gre/modules/systemlibs.js");
-    return libcutils;
-  });
-}
-
-XPCOMUtils.defineLazyServiceGetter(Services, 'captivePortalDetector',
-                                  '@mozilla.org/toolkit/captive-detector;1',
-                                  'nsICaptivePortalDetector');
-
-XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
-              "resource://gre/modules/SafeBrowsing.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "SafeMode",
-                                  "resource://gre/modules/SafeMode.jsm");
-
-window.performance.measure('gecko-shell-jsm-loaded', 'gecko-shell-loadstart');
-
-function debug(str) {
-  dump(' -*- Shell.js: ' + str + '\n');
-}
-
-const once = event => {
-  let target = shell.contentBrowser;
-  return new Promise((resolve, reject) => {
-    target.addEventListener(event, function(evt) {
-      resolve(evt);
-    }, {once: true});
-  });
-}
-
-function clearCache() {
-  let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
-                .getService(Ci.nsICacheStorageService);
-  cache.clear();
-}
-
-function clearCacheAndReload() {
-  // Reload the main frame with a cleared cache.
-  debug('Reloading ' + shell.contentBrowser.contentWindow.location);
-  clearCache();
-  shell.contentBrowser.contentWindow.location.reload(true);
-  once('mozbrowserlocationchange').then(
-    evt => {
-      shell.sendEvent(window, "ContentStart");
-    });
-}
-
-function restart() {
-  let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
-                     .getService(Ci.nsIAppStartup);
-  appStartup.quit(Ci.nsIAppStartup.eForceQuit | Ci.nsIAppStartup.eRestart);
-}
-
-function debugCrashReport(aStr) {
-  AppConstants.MOZ_CRASHREPORTER && dump('Crash reporter : ' + aStr);
-}
-
-var shell = {
-
-  get CrashSubmit() {
-    delete this.CrashSubmit;
-    if (AppConstants.MOZ_CRASHREPORTER) {
-      Cu.import("resource://gre/modules/CrashSubmit.jsm", this);
-      return this.CrashSubmit;
-    } else {
-      dump('Crash reporter : disabled at build time.');
-      return this.CrashSubmit = null;
-    }
-  },
-
-  onlineForCrashReport: function shell_onlineForCrashReport() {
-    let wifiManager = navigator.mozWifiManager;
-    let onWifi = (wifiManager &&
-                  (wifiManager.connection.status == 'connected'));
-    return !Services.io.offline && onWifi;
-  },
-
-  reportCrash: function shell_reportCrash(isChrome, aCrashID) {
-    let crashID = aCrashID;
-    try {
-      // For chrome crashes, we want to report the lastRunCrashID.
-      if (isChrome) {
-        crashID = Cc["@mozilla.org/xre/app-info;1"]
-                    .getService(Ci.nsIXULRuntime).lastRunCrashID;
-      }
-    } catch(e) {
-      debugCrashReport('Failed to fetch crash id. Crash ID is "' + crashID
-                       + '" Exception: ' + e);
-    }
-
-    // Bail if there isn't a valid crashID.
-    if (!this.CrashSubmit || !crashID && !this.CrashSubmit.pendingIDs().length) {
-      return;
-    }
-
-    // purge the queue.
-    this.CrashSubmit.pruneSavedDumps();
-
-    // check for environment affecting crash reporting
-    let env = Cc["@mozilla.org/process/environment;1"]
-                .getService(Ci.nsIEnvironment);
-    let shutdown = env.get("MOZ_CRASHREPORTER_SHUTDOWN");
-    if (shutdown) {
-      let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
-                         .getService(Ci.nsIAppStartup);
-      appStartup.quit(Ci.nsIAppStartup.eForceQuit);
-    }
-
-    let noReport = env.get("MOZ_CRASHREPORTER_NO_REPORT");
-    if (noReport) {
-      return;
-    }
-
-    try {
-      // Check if we should automatically submit this crash.
-      if (Services.prefs.getBoolPref('app.reportCrashes')) {
-        this.submitCrash(crashID);
-      } else {
-        this.deleteCrash(crashID);
-      }
-    } catch (e) {
-      debugCrashReport('Can\'t fetch app.reportCrashes. Exception: ' + e);
-    }
-
-    // We can get here if we're just submitting old pending crashes.
-    // Check that there's a valid crashID so that we only notify the
-    // user if a crash just happened and not when we OOM. Bug 829477
-    if (crashID) {
-      this.sendChromeEvent({
-        type: "handle-crash",
-        crashID: crashID,
-        chrome: isChrome
-      });
-    }
-  },
-
-  deleteCrash: function shell_deleteCrash(aCrashID) {
-    if (aCrashID) {
-      debugCrashReport('Deleting pending crash: ' + aCrashID);
-      shell.CrashSubmit.delete(aCrashID);
-    }
-  },
-
-  // this function submit the pending crashes.
-  // make sure you are online.
-  submitQueuedCrashes: function shell_submitQueuedCrashes() {
-    // submit the pending queue.
-    let pending = shell.CrashSubmit.pendingIDs();
-    for (let crashid of pending) {
-      debugCrashReport('Submitting crash: ' + crashid);
-      shell.CrashSubmit.submit(crashid);
-    }
-  },
-
-  // This function submits a crash when we're online.
-  submitCrash: function shell_submitCrash(aCrashID) {
-    if (this.onlineForCrashReport()) {
-      this.submitQueuedCrashes();
-      return;
-    }
-
-    debugCrashReport('Not online, postponing.');
-
-    Services.obs.addObserver(function observer(subject, topic, state) {
-      let network = subject.QueryInterface(Ci.nsINetworkInfo);
-      if (network.state == Ci.nsINetworkInfo.NETWORK_STATE_CONNECTED
-          && network.type == Ci.nsINetworkInfo.NETWORK_TYPE_WIFI) {
-        shell.submitQueuedCrashes();
-
-        Services.obs.removeObserver(observer, topic);
-      }
-    }, "network-connection-state-changed");
-  },
-
-  get homeURL() {
-    try {
-      let homeSrc = Services.env.get('B2G_HOMESCREEN');
-      if (homeSrc)
-        return homeSrc;
-    } catch (e) {}
-
-    return Services.prefs.getCharPref('b2g.system_startup_url');
-  },
-
-  get manifestURL() {
-    return Services.prefs.getCharPref('b2g.system_manifest_url');
-  },
-
-  _started: false,
-  hasStarted: function shell_hasStarted() {
-    return this._started;
-  },
-
-  bootstrap: function() {
-    window.performance.mark('gecko-shell-bootstrap');
-
-    // Before anything, check if we want to start in safe mode.
-    SafeMode.check(window).then(() => {
-      let startManifestURL =
-        Cc['@mozilla.org/commandlinehandler/general-startup;1?type=b2gbootstrap']
-          .getService(Ci.nsISupports).wrappedJSObject.startManifestURL;
-
-      // If --start-manifest hasn't been specified, we re-use the latest specified manifest.
-      // If it's the first launch, we will fallback to b2g.default.start_manifest_url
-      if (AppConstants.MOZ_GRAPHENE && !startManifestURL) {
-        startManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url", "");
-      }
-
-      if (!startManifestURL) {
-        startManifestURL = Services.prefs.getCharPref("b2g.default.start_manifest_url", "");
-      }
-
-      if (startManifestURL) {
-        Cu.import('resource://gre/modules/Bootstraper.jsm');
-
-        if (AppConstants.MOZ_GRAPHENE && Bootstraper.isInstallRequired(startManifestURL)) {
-          // Installing the app my take some time. We don't want to keep the
-          // native window hidden.
-          showInstallScreen();
-        }
-
-        Bootstraper.ensureSystemAppInstall(startManifestURL)
-                   .then(this.start.bind(this))
-                   .catch(Bootstraper.bailout);
-      } else {
-        this.start();
-      }
-    });
-  },
-
-  start: function shell_start() {
-    window.performance.mark('gecko-shell-start');
-    this._started = true;
-
-    // This forces the initialization of the cookie service before we hit the
-    // network.
-    // See bug 810209
-    let cookies = Cc["@mozilla.org/cookieService;1"];
-
-    try {
-      let cr = Cc["@mozilla.org/xre/app-info;1"]
-                 .getService(Ci.nsICrashReporter);
-      // Dogfood id. We might want to remove it in the future.
-      // see bug 789466
-      try {
-        let dogfoodId = Services.prefs.getCharPref('prerelease.dogfood.id');
-        if (dogfoodId != "") {
-          cr.annotateCrashReport("Email", dogfoodId);
-        }
-      }
-      catch (e) { }
-
-      if (isGonk) {
-        // Annotate crash report
-        let annotations = [ [ "Android_Hardware",     "ro.hardware" ],
-                            [ "Android_Device",       "ro.product.device" ],
-                            [ "Android_CPU_ABI2",     "ro.product.cpu.abi2" ],
-                            [ "Android_CPU_ABI",      "ro.product.cpu.abi" ],
-                            [ "Android_Manufacturer", "ro.product.manufacturer" ],
-                            [ "Android_Brand",        "ro.product.brand" ],
-                            [ "Android_Model",        "ro.product.model" ],
-                            [ "Android_Board",        "ro.product.board" ],
-          ];
-
-        annotations.forEach(function (element) {
-            cr.annotateCrashReport(element[0], libcutils.property_get(element[1]));
-          });
-
-        let androidVersion = libcutils.property_get("ro.build.version.sdk") +
-                             "(" + libcutils.property_get("ro.build.version.codename") + ")";
-        cr.annotateCrashReport("Android_Version", androidVersion);
-
-        SettingsListener.observe("deviceinfo.os", "", function(value) {
-          try {
-            let cr = Cc["@mozilla.org/xre/app-info;1"]
-                       .getService(Ci.nsICrashReporter);
-            cr.annotateCrashReport("B2G_OS_Version", value);
-          } catch(e) { }
-        });
-      }
-    } catch(e) {
-      debugCrashReport('exception: ' + e);
-    }
-
-    let homeURL = this.homeURL;
-    if (!homeURL) {
-      let msg = 'Fatal error during startup: No homescreen found: try setting B2G_HOMESCREEN';
-      alert(msg);
-      return;
-    }
-
-    let manifestURL = this.manifestURL;
-    // <html:iframe id="systemapp"
-    //              mozbrowser="true" allowfullscreen="true"
-    //              style="overflow: hidden; height: 100%; width: 100%; border: none;"
-    //              src="data:text/html;charset=utf-8,%3C!DOCTYPE html>%3Cbody style='background:black;'>"/>
-    let systemAppFrame =
-      document.createElementNS('http://www.w3.org/1999/xhtml', 'html:iframe');
-    systemAppFrame.setAttribute('id', 'systemapp');
-    systemAppFrame.setAttribute('mozbrowser', 'true');
-    systemAppFrame.setAttribute('allowfullscreen', 'true');
-    systemAppFrame.setAttribute('src', 'blank.html');
-    let container = document.getElementById('container');
-
-    if (AppConstants.platform == 'macosx') {
-      // See shell.html
-      let hotfix = document.getElementById('placeholder');
-      if (hotfix) {
-        container.removeChild(hotfix);
-      }
-    }
-
-    this.contentBrowser = container.appendChild(systemAppFrame);
-
-    let webNav = systemAppFrame.contentWindow
-                               .QueryInterface(Ci.nsIInterfaceRequestor)
-                               .getInterface(Ci.nsIWebNavigation);
-    webNav.sessionHistory = Cc["@mozilla.org/browser/shistory;1"].createInstance(Ci.nsISHistory);
-
-    if (AppConstants.MOZ_GRAPHENE) {
-      webNav.QueryInterface(Ci.nsIDocShell).windowDraggingAllowed = true;
-    }
-
-    let audioChannels = systemAppFrame.allowedAudioChannels;
-    audioChannels && audioChannels.forEach(function(audioChannel) {
-      // Set all audio channels as unmuted by default
-      // because some audio in System app will be played
-      // before AudioChannelService[1] is Gaia is loaded.
-      // [1]: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/audio_channel_service.js
-      audioChannel.setMuted(false);
-    });
-
-    // On firefox mulet, shell.html is loaded in a tab
-    // and we have to listen on the chrome event handler
-    // to catch key events
-    let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
-                                   .getInterface(Ci.nsIWebNavigation)
-                                   .QueryInterface(Ci.nsIDocShell)
-                                   .chromeEventHandler || window;
-    // Capture all key events so we can filter out hardware buttons
-    // And send them to Gaia via mozChromeEvents.
-    // Ideally, hardware buttons wouldn't generate key events at all, or
-    // if they did, they would use keycodes that conform to DOM 3 Events.
-    // See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=762362
-    chromeEventHandler.addEventListener('keydown', this, true);
-    chromeEventHandler.addEventListener('keyup', this, true);
-
-    window.addEventListener('MozApplicationManifest', this);
-    window.addEventListener('MozAfterPaint', this);
-    window.addEventListener('sizemodechange', this);
-    window.addEventListener('unload', this);
-    this.contentBrowser.addEventListener('mozbrowserloadstart', this, true);
-    this.contentBrowser.addEventListener('mozbrowserscrollviewchange', this, true);
-    this.contentBrowser.addEventListener('mozbrowsercaretstatechanged', this);
-
-    CustomEventManager.init();
-    UserAgentOverrides.init();
-    CaptivePortalLoginHelper.init();
-
-    this.contentBrowser.src = homeURL;
-
-    this._isEventListenerReady = false;
-
-    window.performance.mark('gecko-shell-system-frame-set');
-
-    ppmm.addMessageListener("content-handler", this);
-    ppmm.addMessageListener("dial-handler", this);
-    ppmm.addMessageListener("sms-handler", this);
-    ppmm.addMessageListener("mail-handler", this);
-    ppmm.addMessageListener("file-picker", this);
-
-    setTimeout(function() {
-      SafeBrowsing.init();
-    }, 5000);
-  },
-
-  stop: function shell_stop() {
-    window.removeEventListener('unload', this);
-    window.removeEventListener('keydown', this, true);
-    window.removeEventListener('keyup', this, true);
-    window.removeEventListener('MozApplicationManifest', this);
-    window.removeEventListener('sizemodechange', this);
-    this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
-    this.contentBrowser.removeEventListener('mozbrowserscrollviewchange', this, true);
-    this.contentBrowser.removeEventListener('mozbrowsercaretstatechanged', this);
-    ppmm.removeMessageListener("content-handler", this);
-
-    UserAgentOverrides.uninit();
-  },
-
-  // If this key event represents a hardware button which needs to be send as
-  // a message, broadcasts it with the message set to 'xxx-button-press' or
-  // 'xxx-button-release'.
-  broadcastHardwareKeys: function shell_broadcastHardwareKeys(evt) {
-    let type;
-    let message;
-
-    let mediaKeys = {
-      'MediaTrackNext': 'media-next-track-button',
-      'MediaTrackPrevious': 'media-previous-track-button',
-      'MediaPause': 'media-pause-button',
-      'MediaPlay': 'media-play-button',
-      'MediaPlayPause': 'media-play-pause-button',
-      'MediaStop': 'media-stop-button',
-      'MediaRewind': 'media-rewind-button',
-      'MediaFastForward': 'media-fast-forward-button'
-    };
-
-    if (evt.keyCode == evt.DOM_VK_F1) {
-      type = 'headset-button';
-      message = 'headset-button';
-    } else if (mediaKeys[evt.key]) {
-      type = 'media-button';
-      message = mediaKeys[evt.key];
-    } else {
-      return;
-    }
-
-    switch (evt.type) {
-      case 'keydown':
-        message = message + '-press';
-        break;
-      case 'keyup':
-        message = message + '-release';
-        break;
-    }
-
-    // Let applications receive the headset button and media key press/release message.
-    if (message !== this.lastHardwareButtonMessage) {
-      this.lastHardwareButtonMessage = message;
-      gSystemMessenger.broadcastMessage(type, message);
-    }
-  },
-
-  lastHardwareButtonMessage: null, // property for the hack above
-  visibleNormalAudioActive: false,
-
-  handleEvent: function shell_handleEvent(evt) {
-    function checkReloadKey() {
-      if (evt.type !== 'keyup') {
-        return false;
-      }
-
-      try {
-        let key = JSON.parse(Services.prefs.getCharPref('b2g.reload_key'));
-        return (evt.keyCode  == key.key   &&
-                evt.ctrlKey  == key.ctrl  &&
-                evt.altKey   == key.alt   &&
-                evt.shiftKey == key.shift &&
-                evt.metaKey  == key.meta);
-      } catch(e) {
-        debug('Failed to get key: ' + e);
-      }
-
-      return false;
-    }
-
-    let content = this.contentBrowser.contentWindow;
-    switch (evt.type) {
-      case 'keydown':
-      case 'keyup':
-        if (checkReloadKey()) {
-          clearCacheAndReload();
-        } else {
-          this.broadcastHardwareKeys(evt);
-        }
-        break;
-      case 'sizemodechange':
-        if (window.windowState == window.STATE_MINIMIZED && !this.visibleNormalAudioActive) {
-          this.contentBrowser.setVisible(false);
-        } else {
-          this.contentBrowser.setVisible(true);
-        }
-        break;
-      case 'load':
-        if (content.document.location == 'about:blank') {
-          return;
-        }
-        content.removeEventListener('load', this, true);
-        this.notifyContentWindowLoaded();
-        break;
-      case 'mozbrowserloadstart':
-        if (content.document.location == 'about:blank') {
-          this.contentBrowser.addEventListener('mozbrowserlocationchange', this, true);
-          return;
-        }
-
-        this.notifyContentStart();
-        break;
-      case 'mozbrowserlocationchange':
-        if (content.document.location == 'about:blank') {
-          return;
-        }
-
-        this.notifyContentStart();
-       break;
-      case 'mozbrowserscrollviewchange':
-        this.sendChromeEvent({
-          type: 'scrollviewchange',
-          detail: evt.detail,
-        });
-        break;
-      case 'mozbrowsercaretstatechanged':
-        {
-          let elt = evt.target;
-          let win = elt.ownerGlobal;
-          let offsetX = win.mozInnerScreenX - window.mozInnerScreenX;
-          let offsetY = win.mozInnerScreenY - window.mozInnerScreenY;
-
-          let rect = elt.getBoundingClientRect();
-          offsetX += rect.left;
-          offsetY += rect.top;
-
-          let data = evt.detail;
-          data.offsetX = offsetX;
-          data.offsetY = offsetY;
-          data.sendDoCommandMsg = null;
-
-          shell.sendChromeEvent({
-            type: 'caretstatechanged',
-            detail: data,
-          });
-        }
-        break;
-
-      case 'MozApplicationManifest':
-        try {
-          if (!Services.prefs.getBoolPref('browser.cache.offline.enable'))
-            return;
-
-          let contentWindow = evt.originalTarget.defaultView;
-          let documentElement = contentWindow.document.documentElement;
-          if (!documentElement)
-            return;
-
-          let manifest = documentElement.getAttribute('manifest');
-          if (!manifest)
-            return;
-
-          let principal = contentWindow.document.nodePrincipal;
-          if (Services.perms.testPermissionFromPrincipal(principal, 'offline-app') == Ci.nsIPermissionManager.UNKNOWN_ACTION) {
-            if (Services.prefs.getBoolPref('browser.offline-apps.notify')) {
-              // FIXME Bug 710729 - Add a UI for offline cache notifications
-              return;
-            }
-            return;
-          }
-
-          Services.perms.addFromPrincipal(principal, 'offline-app',
-                                          Ci.nsIPermissionManager.ALLOW_ACTION);
-
-          let documentURI = Services.io.newURI(contentWindow.document.documentURI);
-          let manifestURI = Services.io.newURI(manifest, null, documentURI);
-          let updateService = Cc['@mozilla.org/offlinecacheupdate-service;1']
-                              .getService(Ci.nsIOfflineCacheUpdateService);
-          updateService.scheduleUpdate(manifestURI, documentURI, principal, window);
-        } catch (e) {
-          dump('Error while creating offline cache: ' + e + '\n');
-        }
-        break;
-      case 'MozAfterPaint':
-        window.removeEventListener('MozAfterPaint', this);
-        // This event should be sent before System app returns with
-        // system-message-listener-ready mozContentEvent, because it's on
-        // the critical launch path of the app.
-        SystemAppProxy._sendCustomEvent('mozChromeEvent', {
-          type: 'system-first-paint'
-        }, /* noPending */ true);
-        break;
-      case 'unload':
-        this.stop();
-        break;
-    }
-  },
-
-  // Send an event to a specific window, document or element.
-  sendEvent: function shell_sendEvent(target, type, details) {
-    if (target === this.contentBrowser) {
-      // We must ask SystemAppProxy to send the event in this case so
-      // that event would be dispatched from frame.contentWindow instead of
-      // on the System app frame.
-      SystemAppProxy._sendCustomEvent(type, details);
-      return;
-    }
-
-    let doc = target.document || target.ownerDocument || target;
-    let event = doc.createEvent('CustomEvent');
-    event.initCustomEvent(type, true, true, details ? details : {});
-    target.dispatchEvent(event);
-  },
-
-  sendCustomEvent: function shell_sendCustomEvent(type, details) {
-    SystemAppProxy._sendCustomEvent(type, details);
-  },
-
-  sendChromeEvent: function shell_sendChromeEvent(details) {
-    this.sendCustomEvent("mozChromeEvent", details);
-  },
-
-  receiveMessage: function shell_receiveMessage(message) {
-    var activities = { 'content-handler': { name: 'view', response: null },
-                       'dial-handler':    { name: 'dial', response: null },
-                       'mail-handler':    { name: 'new',  response: null },
-                       'sms-handler':     { name: 'new',  response: null },
-                       'file-picker':     { name: 'pick', response: 'file-picked' } };
-
-    if (!(message.name in activities))
-      return;
-
-    let data = message.data;
-    let activity = activities[message.name];
-
-    let a = new MozActivity({
-      name: activity.name,
-      data: data
-    });
-
-    if (activity.response) {
-      a.onsuccess = function() {
-        let sender = message.target.QueryInterface(Ci.nsIMessageSender);
-        sender.sendAsyncMessage(activity.response, { success: true,
-                                                     result:  a.result });
-      }
-      a.onerror = function() {
-        let sender = message.target.QueryInterface(Ci.nsIMessageSender);
-        sender.sendAsyncMessage(activity.response, { success: false });
-      }
-    }
-  },
-
-  notifyContentStart: function shell_notifyContentStart() {
-    window.performance.mark('gecko-shell-notify-content-start');
-    this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
-    this.contentBrowser.removeEventListener('mozbrowserlocationchange', this, true);
-
-    let content = this.contentBrowser.contentWindow;
-    content.addEventListener('load', this, true);
-
-    this.reportCrash(true);
-
-    SystemAppProxy.registerFrame(shell.contentBrowser);
-
-    this.sendEvent(window, 'ContentStart');
-
-    Services.obs.notifyObservers(null, 'content-start');
-
-    if (AppConstants.MOZ_GRAPHENE &&
-        Services.prefs.getBoolPref("b2g.nativeWindowGeometry.fullscreen")) {
-      window.fullScreen = true;
-    }
-
-    shell.handleCmdLine();
-  },
-
-  handleCmdLine: function() {
-    // This isn't supported on devices.
-    if (!isGonk) {
-      let b2gcmds = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"]
-                      .getService(Ci.nsISupports);
-      let args = b2gcmds.wrappedJSObject.cmdLine;
-      try {
-        // Returns null if -url is not present.
-        let url = args.handleFlagWithParam("url", false);
-        if (url) {
-          this.sendChromeEvent({type: "mozbrowseropenwindow", url});
-          args.preventDefault = true;
-        }
-      } catch(e) {
-        // Throws if -url is present with no params.
-      }
-    }
-  },
-
-  // This gets called when window.onload fires on the System app content window,
-  // which means things in <html> are parsed and statically referenced <script>s
-  // and <script defer>s are loaded and run.
-  notifyContentWindowLoaded: function shell_notifyContentWindowLoaded() {
-    isGonk && libcutils.property_set('sys.boot_completed', '1');
-
-    // This will cause Gonk Widget to remove boot animation from the screen
-    // and reveals the page.
-    Services.obs.notifyObservers(null, "browser-ui-startup-complete");
-
-    SystemAppProxy.setIsLoaded();
-  },
-
-  // This gets called when the content sends us system-message-listener-ready
-  // mozContentEvent, OR when an observer message tell us we should consider
-  // the content as ready.
-  notifyEventListenerReady: function shell_notifyEventListenerReady() {
-    if (this._isEventListenerReady) {
-      Cu.reportError('shell.js: SystemApp has already been declared as being ready.');
-      return;
-    }
-    this._isEventListenerReady = true;
-
-    if (Services.prefs.getBoolPref('b2g.orientation.animate')) {
-      Cu.import('resource://gre/modules/OrientationChangeHandler.jsm');
-    }
-
-    SystemAppProxy.setIsReady();
-  }
-};
-
-Services.obs.addObserver(function onFullscreenOriginChange(subject, topic, data) {
-  shell.sendChromeEvent({ type: "fullscreenoriginchange",
-                          fullscreenorigin: data });
-}, "fullscreen-origin-change");
-
-Services.obs.addObserver(function onBluetoothVolumeChange(subject, topic, data) {
-  shell.sendChromeEvent({
-    type: "bluetooth-volumeset",
-    value: data
-  });
-}, 'bluetooth-volume-change');
-
-Services.obs.addObserver(function(subject, topic, data) {
-  shell.sendCustomEvent('mozmemorypressure');
-}, 'memory-pressure');
-
-Services.obs.addObserver(function(subject, topic, data) {
-  shell.notifyEventListenerReady();
-}, 'system-message-listener-ready');
-
-var permissionMap = new Map([
-  ['unknown', Services.perms.UNKNOWN_ACTION],
-  ['allow', Services.perms.ALLOW_ACTION],
-  ['deny', Services.perms.DENY_ACTION],
-  ['prompt', Services.perms.PROMPT_ACTION],
-]);
-var permissionMapRev = new Map(Array.from(permissionMap.entries()).reverse());
-
-var CustomEventManager = {
-  init: function custevt_init() {
-    window.addEventListener("ContentStart", (function(evt) {
-      let content = shell.contentBrowser.contentWindow;
-      content.addEventListener("mozContentEvent", this, false, true);
-    }).bind(this));
-  },
-
-  handleEvent: function custevt_handleEvent(evt) {
-    let detail = evt.detail;
-    dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n");
-
-    switch(detail.type) {
-      case 'system-message-listener-ready':
-        Services.obs.notifyObservers(null, 'system-message-listener-ready');
-        break;
-      case 'captive-portal-login-cancel':
-        CaptivePortalLoginHelper.handleEvent(detail);
-        break;
-      case 'inputmethod-update-layouts':
-      case 'inputregistry-add':
-      case 'inputregistry-remove':
-        KeyboardHelper.handleEvent(detail);
-        break;
-      case 'copypaste-do-command':
-        Services.obs.notifyObservers({ wrappedJSObject: shell.contentBrowser },
-                                     'ask-children-to-execute-copypaste-command', detail.cmd);
-        break;
-      case 'add-permission':
-        Services.perms.add(Services.io.newURI(detail.uri),
-                           detail.permissionType, permissionMap.get(detail.permission));
-        break;
-      case 'remove-permission':
-        Services.perms.remove(Services.io.newURI(detail.uri),
-                              detail.permissionType);
-        break;
-      case 'test-permission':
-        let result = Services.perms.testExactPermission(
-          Services.io.newURI(detail.uri), detail.permissionType);
-        // Not equal check here because we want to prevent default only if it's not set
-        if (result !== permissionMapRev.get(detail.permission)) {
-          evt.preventDefault();
-        }
-        break;
-      case 'shutdown-application':
-        let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
-                           .getService(Ci.nsIAppStartup);
-        appStartup.quit(appStartup.eAttemptQuit);
-        break;
-      case 'toggle-fullscreen-native-window':
-        window.fullScreen = !window.fullScreen;
-        Services.prefs.setBoolPref("b2g.nativeWindowGeometry.fullscreen",
-                                   window.fullScreen);
-        break;
-      case 'minimize-native-window':
-        window.minimize();
-        break;
-      case 'clear-cache-and-reload':
-        clearCacheAndReload();
-        break;
-      case 'clear-cache-and-restart':
-        clearCache();
-        restart();
-        break;
-      case 'restart':
-        restart();
-        break;
-    }
-  }
-}
-
-var KeyboardHelper = {
-  handleEvent: function keyboard_handleEvent(detail) {
-    switch (detail.type) {
-      case 'inputmethod-update-layouts':
-        Keyboard.setLayouts(detail.layouts);
-
-        break;
-      case 'inputregistry-add':
-      case 'inputregistry-remove':
-        Keyboard.inputRegistryGlue.returnMessage(detail);
-
-        break;
-    }
-  }
-};
-
-// This is the backend for Gaia's screenshot feature.  Gaia requests a
-// screenshot by sending a mozContentEvent with detail.type set to
-// 'take-screenshot'.  Then we take a screenshot and send a
-// mozChromeEvent with detail.type set to 'take-screenshot-success'
-// and detail.file set to the an image/png blob
-window.addEventListener('ContentStart', function ss_onContentStart() {
-  let content = shell.contentBrowser.contentWindow;
-  content.addEventListener('mozContentEvent', function ss_onMozContentEvent(e) {
-    if (e.detail.type !== 'take-screenshot')
-      return;
-
-    try {
-      shell.sendChromeEvent({
-        type: 'take-screenshot-success',
-        file: Screenshot.get()
-      });
-    } catch (e) {
-      dump('exception while creating screenshot: ' + e + '\n');
-      shell.sendChromeEvent({
-        type: 'take-screenshot-error',
-        error: String(e)
-      });
-    }
-  });
-});
-
-(function contentCrashTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-      let props = aSubject.QueryInterface(Ci.nsIPropertyBag2);
-      if (props.hasKey("abnormal") && props.hasKey("dumpID")) {
-        shell.reportCrash(false, props.getProperty("dumpID"));
-      }
-    },
-    "ipc:content-shutdown");
-})();
-
-var CaptivePortalLoginHelper = {
-  init: function init() {
-    Services.obs.addObserver(this, 'captive-portal-login');
-    Services.obs.addObserver(this, 'captive-portal-login-abort');
-    Services.obs.addObserver(this, 'captive-portal-login-success');
-  },
-  handleEvent: function handleEvent(detail) {
-    Services.captivePortalDetector.cancelLogin(detail.id);
-  },
-  observe: function observe(subject, topic, data) {
-    shell.sendChromeEvent(JSON.parse(data));
-  }
-}
-
-// Listen for crashes submitted through the crash reporter UI.
-window.addEventListener('ContentStart', function cr_onContentStart() {
-  let content = shell.contentBrowser.contentWindow;
-  content.addEventListener("mozContentEvent", function cr_onMozContentEvent(e) {
-    if (e.detail.type == "submit-crash" && e.detail.crashID) {
-      debugCrashReport("submitting crash at user request ", e.detail.crashID);
-      shell.submitCrash(e.detail.crashID);
-    } else if (e.detail.type == "delete-crash" && e.detail.crashID) {
-      debugCrashReport("deleting crash at user request ", e.detail.crashID);
-      shell.deleteCrash(e.detail.crashID);
-    }
-  });
-});
-
-window.addEventListener('ContentStart', function update_onContentStart() {
-  if (!AppConstants.MOZ_UPDATER) {
-    return;
-  }
-
-  let promptCc = Cc["@mozilla.org/updates/update-prompt;1"];
-  if (!promptCc) {
-    return;
-  }
-
-  let updatePrompt = promptCc.createInstance(Ci.nsIUpdatePrompt);
-  if (!updatePrompt) {
-    return;
-  }
-
-  updatePrompt.wrappedJSObject.handleContentStart(shell);
-});
-/* The "GPSChipOn" is to indicate that GPS engine is turned ON by the modem.
-   During this GPS engine is turned ON by the modem, we make the location tracking icon visible to user.
-   Once GPS engine is turned OFF, the location icon will disappear.
-   If GPS engine is not turned ON by the modem or GPS location service is triggered,
-   we let GPS service take over the control of showing the location tracking icon.
-   The regular sequence of the geolocation-device-events is: starting-> GPSStarting-> shutdown-> GPSShutdown
-*/
-
-
-(function geolocationStatusTracker() {
-  let gGeolocationActive = false;
-  let GPSChipOn = false;
-
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    let oldState = gGeolocationActive;
-    let promptWarning = false;
-    switch (aData) {
-      case "GPSStarting":
-        if (!gGeolocationActive) {
-          gGeolocationActive = true;
-          GPSChipOn = true;
-          promptWarning = true;
-        }
-        break;
-      case "GPSShutdown":
-        if (GPSChipOn) {
-          gGeolocationActive = false;
-          GPSChipOn = false;
-        }
-        break;
-      case "starting":
-        gGeolocationActive = true;
-        GPSChipOn = false;
-        break;
-      case "shutdown":
-        gGeolocationActive = false;
-        break;
-    }
-
-    if (gGeolocationActive != oldState) {
-      shell.sendChromeEvent({
-        type: 'geolocation-status',
-        active: gGeolocationActive,
-        prompt: promptWarning
-      });
-    }
-}, "geolocation-device-events");
-})();
-
-(function headphonesStatusTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    shell.sendChromeEvent({
-      type: 'headphones-status-changed',
-      state: aData
-    });
-}, "headphones-status-changed");
-})();
-
-(function audioChannelChangedTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    shell.sendChromeEvent({
-      type: 'audio-channel-changed',
-      channel: aData
-    });
-}, "audio-channel-changed");
-})();
-
-(function defaultVolumeChannelChangedTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    shell.sendChromeEvent({
-      type: 'default-volume-channel-changed',
-      channel: aData
-    });
-}, "default-volume-channel-changed");
-})();
-
-(function visibleAudioChannelChangedTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    shell.sendChromeEvent({
-      type: 'visible-audio-channel-changed',
-      channel: aData
-    });
-    shell.visibleNormalAudioActive = (aData == 'normal');
-}, "visible-audio-channel-changed");
-})();
-
-(function recordingStatusTracker() {
-  // Recording status is tracked per process with following data structure:
-  // {<processId>: {<requestURL>: {isApp: <isApp>,
-  //                               count: <N>,
-  //                               audioCount: <N>,
-  //                               videoCount: <N>}}
-  let gRecordingActiveProcesses = {};
-
-  let recordingHandler = function(aSubject, aTopic, aData) {
-    let props = aSubject.QueryInterface(Ci.nsIPropertyBag2);
-    let processId = (props.hasKey('childID')) ? props.get('childID')
-                                              : 'main';
-    if (processId && !gRecordingActiveProcesses.hasOwnProperty(processId)) {
-      gRecordingActiveProcesses[processId] = {};
-    }
-
-    let commandHandler = function (requestURL, command) {
-      let currentProcess = gRecordingActiveProcesses[processId];
-      let currentActive = currentProcess[requestURL];
-      let wasActive = (currentActive['count'] > 0);
-      let wasAudioActive = (currentActive['audioCount'] > 0);
-      let wasVideoActive = (currentActive['videoCount'] > 0);
-
-      switch (command.type) {
-        case 'starting':
-          currentActive['count']++;
-          currentActive['audioCount'] += (command.isAudio) ? 1 : 0;
-          currentActive['videoCount'] += (command.isVideo) ? 1 : 0;
-          break;
-        case 'shutdown':
-          currentActive['count']--;
-          currentActive['audioCount'] -= (command.isAudio) ? 1 : 0;
-          currentActive['videoCount'] -= (command.isVideo) ? 1 : 0;
-          break;
-        case 'content-shutdown':
-          currentActive['count'] = 0;
-          currentActive['audioCount'] = 0;
-          currentActive['videoCount'] = 0;
-          break;
-      }
-
-      if (currentActive['count'] > 0) {
-        currentProcess[requestURL] = currentActive;
-      } else {
-        delete currentProcess[requestURL];
-      }
-
-      // We need to track changes if any active state is changed.
-      let isActive = (currentActive['count'] > 0);
-      let isAudioActive = (currentActive['audioCount'] > 0);
-      let isVideoActive = (currentActive['videoCount'] > 0);
-      if ((isActive != wasActive) ||
-          (isAudioActive != wasAudioActive) ||
-          (isVideoActive != wasVideoActive)) {
-        shell.sendChromeEvent({
-          type: 'recording-status',
-          active: isActive,
-          requestURL: requestURL,
-          isApp: currentActive['isApp'],
-          isAudio: isAudioActive,
-          isVideo: isVideoActive
-        });
-      }
-    };
-
-    switch (aData) {
-      case 'starting':
-      case 'shutdown':
-        // create page record if it is not existed yet.
-        let requestURL = props.get('requestURL');
-        if (requestURL &&
-            !gRecordingActiveProcesses[processId].hasOwnProperty(requestURL)) {
-          gRecordingActiveProcesses[processId][requestURL] = {isApp: props.get('isApp'),
-                                                              count: 0,
-                                                              audioCount: 0,
-                                                              videoCount: 0};
-        }
-        commandHandler(requestURL, { type: aData,
-                                     isAudio: props.get('isAudio'),
-                                     isVideo: props.get('isVideo')});
-        break;
-      case 'content-shutdown':
-        // iterate through all the existing active processes
-        Object.keys(gRecordingActiveProcesses[processId]).forEach(function(requestURL) {
-          commandHandler(requestURL, { type: aData,
-                                       isAudio: true,
-                                       isVideo: true});
-        });
-        break;
-    }
-
-    // clean up process record if no page record in it.
-    if (Object.keys(gRecordingActiveProcesses[processId]).length == 0) {
-      delete gRecordingActiveProcesses[processId];
-    }
-  };
-  Services.obs.addObserver(recordingHandler, 'recording-device-events');
-  Services.obs.addObserver(recordingHandler, 'recording-device-ipc-events');
-
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    // send additional recording events if content process is being killed
-    let processId = aSubject.QueryInterface(Ci.nsIPropertyBag2).get('childID');
-    if (gRecordingActiveProcesses.hasOwnProperty(processId)) {
-      Services.obs.notifyObservers(aSubject, 'recording-device-ipc-events', 'content-shutdown');
-    }
-  }, 'ipc:content-shutdown');
-})();
-
-(function volumeStateTracker() {
-  Services.obs.addObserver(function(aSubject, aTopic, aData) {
-    shell.sendChromeEvent({
-      type: 'volume-state-changed',
-      active: (aData == 'Shared')
-    });
-}, 'volume-state-changed');
-})();
-
-if (isGonk) {
-  // Devices don't have all the same partition size for /cache where we
-  // store the http cache.
-  (function setHTTPCacheSize() {
-    let path = Services.prefs.getCharPref("browser.cache.disk.parent_directory");
-    let volumeService = Cc["@mozilla.org/telephony/volume-service;1"]
-                          .getService(Ci.nsIVolumeService);
-
-    let stats = volumeService.createOrGetVolumeByPath(path).getStats();
-
-    // We must set the size in KB, and keep a bit of free space.
-    let size = Math.floor(stats.totalBytes / 1024) - 1024;
-
-    // keep the default value if it is smaller than the physical partition size.
-    let oldSize = Services.prefs.getIntPref("browser.cache.disk.capacity");
-    if (size < oldSize) {
-      Services.prefs.setIntPref("browser.cache.disk.capacity", size);
-    }
-  })();
-
-  try {
-    let gmpService = Cc["@mozilla.org/gecko-media-plugin-service;1"]
-                       .getService(Ci.mozIGeckoMediaPluginChromeService);
-    gmpService.addPluginDirectory("/system/b2g/gmp-clearkey/0.1");
-  } catch(e) {
-    dump("Failed to add clearkey path! " + e + "\n");
-  }
-}
-
-// Calling this observer will cause a shutdown an a profile reset.
-// Use eg. : Services.obs.notifyObservers(null, 'b2g-reset-profile', null);
-Services.obs.addObserver(function resetProfile(subject, topic, data) {
-  Services.obs.removeObserver(resetProfile, topic);
-
-  // Listening for 'profile-before-change-telemetry' which is late in the
-  // shutdown sequence, but still has xpcom access.
-  Services.obs.addObserver(function clearProfile(subject, topic, data) {
-    Services.obs.removeObserver(clearProfile, topic);
-    if (isGonk) {
-      let json = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
-      json.initWithPath('/system/b2g/webapps/webapps.json');
-      let toRemove = json.exists()
-        // This is a user build, just rm -r /data/local /data/b2g/mozilla
-        ? ['/data/local', '/data/b2g/mozilla']
-        // This is an eng build. We clear the profile and a set of files
-        // under /data/local.
-        : ['/data/b2g/mozilla',
-           '/data/local/permissions.sqlite',
-           '/data/local/storage',
-           '/data/local/OfflineCache'];
-
-      toRemove.forEach(function(dir) {
-        try {
-          let file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
-          file.initWithPath(dir);
-          file.remove(true);
-        } catch(e) { dump(e); }
-      });
-    } else {
-      // Desktop builds.
-      let profile = Services.dirsvc.get('ProfD', Ci.nsIFile);
-
-      // We don't want to remove everything from the profile, since this
-      // would prevent us from starting up.
-      let whitelist = ['defaults', 'extensions', 'settings.json',
-                       'user.js', 'webapps'];
-      let enumerator = profile.directoryEntries;
-      while (enumerator.hasMoreElements()) {
-        let file = enumerator.getNext().QueryInterface(Ci.nsIFile);
-        if (whitelist.indexOf(file.leafName) == -1) {
-          file.remove(true);
-        }
-      }
-    }
-  },
-  'profile-before-change-telemetry');
-
-  let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
-                     .getService(Ci.nsIAppStartup);
-  appStartup.quit(Ci.nsIAppStartup.eForceQuit);
-}, 'b2g-reset-profile');
-
-var showInstallScreen;
-
-if (AppConstants.MOZ_GRAPHENE) {
-  const restoreWindowGeometry = () => {
-    let screenX = Services.prefs.getIntPref("b2g.nativeWindowGeometry.screenX");
-    let screenY = Services.prefs.getIntPref("b2g.nativeWindowGeometry.screenY");
-    let width = Services.prefs.getIntPref("b2g.nativeWindowGeometry.width");
-    let height = Services.prefs.getIntPref("b2g.nativeWindowGeometry.height");
-
-    if (screenX == -1) {
-      // Center
-      screenX = (screen.width - width) / 2;
-      screenY = (screen.height - height) / 2;
-    }
-