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

Unified Diff: chrome/browser/resources/supervised_user_internals.js

Issue 1300643002: Added user settings to chrome://supervised-user-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SupervisedUserSettingsService supports unsubscription Created 5 years, 4 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
Index: chrome/browser/resources/supervised_user_internals.js
diff --git a/chrome/browser/resources/supervised_user_internals.js b/chrome/browser/resources/supervised_user_internals.js
index 065639ec1804e0128f17a3d347ef39156ef30e2b..7d4fe73a435fd0a4614d81c85456f8e5912c7933 100644
--- a/chrome/browser/resources/supervised_user_internals.js
+++ b/chrome/browser/resources/supervised_user_internals.js
@@ -39,7 +39,7 @@ cr.define('chrome.supervised_user_internals', function() {
}
function receiveBasicInfo(info) {
- jstProcess(new JsEvalContext(info), $('info'));
+ jstProcess(new JsEvalContext(info), $('basic-info'));
// Hack: Schedule another refresh after a while.
// TODO(treib): Get rid of this once we're properly notified of all
@@ -47,6 +47,21 @@ cr.define('chrome.supervised_user_internals', function() {
setTimeout(function() { chrome.send('getBasicInfo'); }, 5000);
}
+ function receiveUserSettings(settings) {
+ // The user settings are returned as an object, flatten them into a
+ // list of key/value pairs for easier consumption by the HTML template.
+ // This is not done recursively, values are passed as their JSON
+ // representation.
+ var kvpairs = Object.keys(settings).map(function(key) {
+ return {
+ key: key,
+ value: JSON.stringify(settings[key], null, 2)
+ };
+ });
+
+ jstProcess(new JsEvalContext({settings: kvpairs}), $('user-settings'));
+ }
+
function receiveTryURLResult(result) {
$('try-url-result').textContent = result;
}
@@ -95,6 +110,7 @@ cr.define('chrome.supervised_user_internals', function() {
initialize: initialize,
highlightIfChanged: highlightIfChanged,
receiveBasicInfo: receiveBasicInfo,
+ receiveUserSettings: receiveUserSettings,
receiveTryURLResult: receiveTryURLResult,
receiveFilteringResult: receiveFilteringResult,
};

Powered by Google App Engine
This is Rietveld 408576698