Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4848)

Unified Diff: chrome/browser/resources/gpu_internals/info_view.js

Issue 10910026: Show about:sandbox status in the about:gpu page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Show about:sandbox status in the about:gpu page. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/gpu_internals/info_view.html ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gpu_internals/info_view.js
diff --git a/chrome/browser/resources/gpu_internals/info_view.js b/chrome/browser/resources/gpu_internals/info_view.js
index 69dd0a617c7f5ab53f1ace2fdc6a12905e00458a..b3eff79610c01ec853b1250cb2be4061b65fc460 100644
--- a/chrome/browser/resources/gpu_internals/info_view.js
+++ b/chrome/browser/resources/gpu_internals/info_view.js
@@ -27,6 +27,8 @@ cr.define('gpu', function() {
this.refresh.bind(this));
browserBridge.addEventListener('clientInfoChange',
this.refresh.bind(this));
+ browserBridge.addEventListener('sandboxInfoChange',
+ this.refresh.bind(this));
browserBridge.addEventListener('crashListChange',
this.refresh.bind(this));
this.refresh();
@@ -72,6 +74,60 @@ cr.define('gpu', function() {
this.setText_('client-info', '... loading...');
}
+ // Sandbox info
+ var sandboxStatusList = this.querySelector('.sandbox-status-list');
+ if (browserBridge.sandboxInfo) {
+ sandboxStatusList.textContent = '';
+ var sandboxInfo = browserBridge.sandboxInfo;
+ var statusList = [
+ {
+ description: 'SUID Sandbox',
+ value: sandboxInfo.suid_sanbox
+ },
+ {
+ description: 'PID namespaces',
+ value: sandboxInfo.pid_namespaces
+ },
+ {
+ description: 'Network namespaces',
+ value: sandboxInfo.net_namespaces
+ },
+ {
+ description: 'Seccomp-legacy sandbox',
+ value: sandboxInfo.seccomp_legacy
+ },
+ {
+ description: 'Seccomp-BPF sandbox',
+ value: sandboxInfo.seccomp_bpf
+ },
+ {
+ description: 'Adequately sandboxed',
+ value: sandboxInfo.sandbox_ok
+ }
+ ];
+ statusList.forEach(function(item) {
+ var featureEl = document.createElement('li');
+
+ var nameEl = document.createElement('span');
+ nameEl.textContent = item.description + ': ';
+ featureEl.appendChild(nameEl);
+
+ var statusEl = document.createElement('span');
+ if (item.value) {
+ statusEl.textContent = 'Yes';
+ statusEl.className = 'feature-green';
+ } else {
+ statusEl.textContent = 'No';
+ statusEl.className = 'feature-red';
+ }
+ featureEl.appendChild(statusEl);
+
+ sandboxStatusList.appendChild(featureEl);
+ });
+ } else {
+ sandboxStatusList.textContent = '';
+ }
+
// Feature map
var featureLabelMap = {
'2d_canvas': 'Canvas',
« no previous file with comments | « chrome/browser/resources/gpu_internals/info_view.html ('k') | chrome/browser/ui/webui/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698