Chromium Code Reviews| 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 = |
|
Devlin
2017/01/10 15:25:21
Why document.querySelector('#foo') instead of $('f
stevenjb
2017/01/10 17:49:39
No particular reason, I just copied from somewhere
Devlin
2017/01/10 18:43:06
AFAIK, we still use $ liberally. It's also shorte
stevenjb
2017/01/10 18:58:29
I didn't mean to suggest that $ wasn't. We also ho
|
| + 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) { |