summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/dev_ui_loader
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/dev_ui_loader')
-rw-r--r--chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.css45
-rw-r--r--chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.grdp6
-rw-r--r--chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.html22
-rw-r--r--chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.js51
4 files changed, 0 insertions, 124 deletions
diff --git a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.css b/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.css
deleted file mode 100644
index aa35e0acfab..00000000000
--- a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright 2019 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-body {
- align-items: center;
- display: flex;
- flex-direction: column;
- font-family: sans, Arial, sans-serif;
- font-size: 93.75%;
- justify-content: flex-start;
-}
-
-/* This is needed to hide elements that have "display" set. */
-[hidden] {
- display: none !important;
-}
-
-#failure-message {
- display: inline-block;
- padding-top: 100px;
-}
-
-h1.heading {
- color: rgb(32, 33, 36);
- font-size: 1.6em;
- font-weight: normal;
- line-height: 1.25em;
- margin: 0 0 15px 0;
-}
-
-.list-header {
- color: #2B2B2B;
- line-height: 1.61em;
- margin: 0 8px 0 0;
-}
-
-ul.suggestions-list {
- margin-top: 0;
-}
-
-ul.suggestions-list li {
- color: #2B2B2B;
- line-height: 1.55;
-}
diff --git a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.grdp b/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.grdp
deleted file mode 100644
index 547e30b812d..00000000000
--- a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.grdp
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<grit-part>
- <include name="IDR_DEV_UI_LOADER_HTML" file="resources/dev_ui_loader/dev_ui_loader.html" compress="gzip" type="BINDATA" />
- <include name="IDR_DEV_UI_LOADER_CSS" file="resources/dev_ui_loader/dev_ui_loader.css" compress="gzip" type="BINDATA" />
- <include name="IDR_DEV_UI_LOADER_JS" file="resources/dev_ui_loader/dev_ui_loader.js" compress="gzip" type="BINDATA" />
-</grit-part>
diff --git a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.html b/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.html
deleted file mode 100644
index fc95229fb39..00000000000
--- a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>DevUI DFM Loader</title>
- <link rel="stylesheet" href="dev_ui_loader.css">
- <script src="chrome://resources/js/cr.js"></script>
- <script src="chrome://resources/js/promise_resolver.js"></script>
- <script src="dev_ui_loader.js"></script>
-</head>
-<body>
-<div id="failure-message" hidden>
- <h1 class="heading">Something went wrong</h1>
- <p class="list-header">Try:</p>
- <ul class="suggestions-list">
- <li>Reloading this page</li>
- <li>Checking your internet connection</li>
- </ul>
-</div>
-</body>
-</html>
diff --git a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.js b/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.js
deleted file mode 100644
index 61bc4c25be8..00000000000
--- a/chromium/chrome/browser/resources/dev_ui_loader/dev_ui_loader.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-(function() {
-'use strict';
-
-/** @return {!URL} */
-function getRedirectUrl() {
- try { // For potential TypeError from new URL().
- const urlString = new URL(location).searchParams.get('url');
- if (urlString) {
- const url = new URL(decodeURIComponent(urlString));
- // Perform basic filtering. Also skip 'dev-ui-loader' to avoid redirect
- // cycle (benign but bizarre). Note that |url.host| is always lowercase.
- if (url.protocol === 'chrome:' && url.host.match(/[a-z0-9_\-]+/) &&
- url.host !== 'dev-ui-loader') {
- return url;
- }
- }
- } catch (e) {
- }
- return new URL('chrome://chrome-urls');
-}
-
-function redirectToChromePage() {
- // Use replace() so the current page disappears from history.
- location.replace(getRedirectUrl());
-}
-
-function doInstall() {
- cr.sendWithPromise('installAndLoadDevUiDfm').then((response) => {
- const status = response[0];
- if (status === 'success' || status === 'noop') {
- redirectToChromePage();
- } else if (status === 'failure') {
- document.querySelector('#failure-message').hidden = false;
- }
- });
-}
-
-document.addEventListener('DOMContentLoaded', () => {
- cr.sendWithPromise('getDevUiDfmState').then((state) => {
- if (state === 'ready') {
- redirectToChromePage();
- } else if (state === 'not-installed' || 'not-loaded') {
- doInstall();
- }
- });
-});
-})();