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

Unified Diff: chrome/browser/resources/chromeos/network_ui/network_ui.js

Issue 2620463003: Add getGlobalPolicy to networkingPrivate API. (Closed)
Patch Set: Created 3 years, 11 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/chromeos/network_ui/network_ui.js
diff --git a/chrome/browser/resources/chromeos/network_ui/network_ui.js b/chrome/browser/resources/chromeos/network_ui/network_ui.js
index 7b02ed8dd756530617816c1960ff33e675e67614..7b31697eacdf965501bc8f801c745716f8982248 100644
--- a/chrome/browser/resources/chromeos/network_ui/network_ui.js
+++ b/chrome/browser/resources/chromeos/network_ui/network_ui.js
@@ -314,6 +314,16 @@ var NetworkUI = (function() {
};
/**
+ * Requests the global policy dictionary and updates the page.
+ */
+ var requestGlobalPolicy = function() {
+ chrome.networkingPrivate.getGlobalPolicy(function(policy) {
+ document.querySelector('#global-policy').textContent =
+ JSON.stringify(policy);
+ });
+ };
+
+ /**
* Sets refresh rate if the interval is found in the url.
*/
var setRefresh = function() {
@@ -334,6 +344,7 @@ var NetworkUI = (function() {
$('refresh').onclick = requestNetworks;
setRefresh();
requestNetworks();
+ requestGlobalPolicy();
});
document.addEventListener('custom-item-selected', function(event) {

Powered by Google App Engine
This is Rietveld 408576698