Commit bf433292 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS MultiDevice] Remove Pollux-related debug UI code

This code used oppressive language which needed to be removed, but it
wasn't actually being used anyway, so I removed it.

Bug: 1123072
Change-Id: I7034dfde159d317699988d4eeae417debb7c1fdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387124
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarRegan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803366}
parent 5031367b
......@@ -40,9 +40,6 @@ ProximityAuthUI::ProximityAuthUI(
IDR_MULTIDEVICE_PROXIMITY_AUTH_CSS);
source->AddResourcePath("proximity_auth.js",
IDR_MULTIDEVICE_PROXIMITY_AUTH_JS);
source->AddResourcePath("pollux.html", IDR_MULTIDEVICE_POLLUX_HTML);
source->AddResourcePath("pollux.css", IDR_MULTIDEVICE_POLLUX_CSS);
source->AddResourcePath("pollux.js", IDR_MULTIDEVICE_POLLUX_JS);
content::BrowserContext* browser_context =
web_ui->GetWebContents()->GetBrowserContext();
......
/* Copyright 2017 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.
*/
.control-row {
display: flex;
align-items: center;
margin-bottom: 5px;
padding-left: 12px;
}
.control-row-text {
font-size: 14px;
width: 100px;
}
.textinput {
min-width: 200px;
font-family: monospace;
margin: 0 5px;
font-size: 16px;
}
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<link href="chrome://resources/css/roboto.css" rel="stylesheet">
<link href="common.css" rel='stylesheet'>
<link href="pollux.css" rel='stylesheet'>
<script src='webui.js' type='text/javascript'></script>
<script src='logs.js' type='text/javascript'></script>
<script src='pollux.js' type='text/javascript'></script>
</head>
<body>
<!-- Panel for debug controls. -->
<section id='controls'>
<header>
<div class='logo'></div>
<div class='title'>POLLUX</div>
</header>
<div id='controls-panel'>
<!-- Controls for server simulation -->
<div class='control'>
<div class='control-title'>SERVER</div>
<div class='control-row'>
<div class='control-row-text'>MASTER_KEY:</div>
<input class='textinput' type='text' value='F3DA234A14'>
</div>
<div class='control-row'><button>Challenge</button></div>
</div>
<!-- Controls for testing getAssertion() -->
<div class='control'>
<div class='control-title'>GET ASSERTION</div>
<div class='control-row'>
<div class='control-row-text'>CHALLENGE:</div>
<input class='textinput' type='text' value='A3DA234A14'>
</div>
<div class='control-row'>
<div class='control-row-text'>EID:</div>
<input class='textinput' type='text' value='A3DA234A14'>
</div>
<div class='control-row'>
<div class='control-row-text'>SESSION_KEY:</div>
<input class='textinput' type='text' value='A3DA234A14'>
</div>
<div class='control-row'><button>Start</button></div>
</div>
<!-- Controls for the state of the remote device (AKA Authenticator) -->
<div class='control'>
<div class='control-title'>AUTHENTICATOR STATE</div>
<div class='control-row'>
<div class='control-row-text'>NOT STARTED</div>
</div>
</div>
</div>
</section>
<!-- Panel for logs list. -->
<section id='logs-panel'>
<header>
<button id='clear-logs-button'></button>
</header>
<div id='logs-list'>
<template id='item-template'>
<div class='log-item' severity='0'>
<div class="item-metadata">
<div class='item-time'></div>
<div class="flex"></div>
<div class='item-source'></div>
</div>
<pre class="item-text flex">This is an error.</pre>
</div>
</template>
</div>
</section>
</body>
</html>
/* Copyright 2017 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.
*/
Pollux = {
controller_: null,
/**
* Initializes the debug UI.
*/
init: function() {
Pollux.controller_ = new PolluxController();
}
};
/**
* Interface with the native WebUI component for Pollux events.
*/
PolluxInterface = {
/**
* Called when a new challenge is created.
*/
onChallengeCreated: function(challenge, eid, sessionKey) {
if (Pollux.controller_) {
Pollux.controller_.add(log);
}
},
};
class PolluxController {
constructor() {
this.masterKeyInput_ = document.getElementById('master-key-input');
this.challengeButton_ = document.getElementById('challenge-button');
this.challengeInput_ = document.getElementById('challenge-input');
this.eidInput_ = document.getElementById('eid-input');
this.sessionKeyInput_ = document.getElementById('session-key-input');
this.assertionButton = document.getElementById('assertion-button');
this.authStateElement_ = document.getElementById('authenticator-state');
this.challengeButton_.onclick = this.createNewChallenge_.bind(this);
this.assertionButton_.onclick = this.startAssertion_.bind(this);
}
}
document.addEventListener('DOMContentLoaded', function() {
WebUI.onWebContentsInitialized();
Logs.init();
});
......@@ -26,7 +26,7 @@
use_base_dir="false"
type="BINDATA" />
<!-- Web resources shared by both the ProximityAuth and Pollux debug pages.. -->
<!-- Resources for ProximityAuth debug page. -->
<include name="IDR_MULTIDEVICE_INDEX_HTML"
file="../components/multidevice/debug_webui/resources/index.html"
flattenhtml="true"
......@@ -45,8 +45,6 @@
flattenhtml="true"
allowexternalscript="true"
type="BINDATA" />
<!-- Resources for ProximityAuth debug page. -->
<include name="IDR_MULTIDEVICE_PROXIMITY_AUTH_HTML"
file="../components/multidevice/debug_webui/resources/proximity_auth.html"
flattenhtml="true"
......@@ -60,19 +58,4 @@
flattenhtml="true"
allowexternalscript="true"
type="BINDATA" />
<!-- Resources for Pollux debug page. -->
<include name="IDR_MULTIDEVICE_POLLUX_HTML"
file="../components/multidevice/debug_webui/resources/pollux.html"
flattenhtml="true"
allowexternalscript="true"
type="BINDATA" />
<include name="IDR_MULTIDEVICE_POLLUX_CSS"
file="../components/multidevice/debug_webui/resources/pollux.css"
type="BINDATA" />
<include name="IDR_MULTIDEVICE_POLLUX_JS"
file="../components/multidevice/debug_webui/resources/pollux.js"
flattenhtml="true"
allowexternalscript="true"
type="BINDATA" />
</grit-part>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment