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

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

Issue 10236003: Added RefreshPolicies to PolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos build (this time I mean it) Created 8 years, 8 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/policy.js
diff --git a/chrome/browser/resources/policy.js b/chrome/browser/resources/policy.js
index 5c26d8b08b406c2e8d157b1d5afd87651dbc2ea8..242f67348859377b674b01842419a44fd46c9076 100644
--- a/chrome/browser/resources/policy.js
+++ b/chrome/browser/resources/policy.js
@@ -13,6 +13,10 @@ var policyDataFormat = {
// False if the policy information is being sent due to an initial page load
// and true if it is being sent due to a change of policy values.
'isPolicyUpdate': false,
+
+ // True if a policy fetch that was requested has completed.
+ 'isRefreshDone': false,
+
'policies': [
{
'level': 'managed',
@@ -216,12 +220,12 @@ cr.define('policies', function() {
* by the policyDataFormat.
*/
Policy.returnData = function(policyData) {
+ if (policyData.isRefreshDone)
+ $('fetch-policies-button').disabled = false;
if (policyData.isPolicyUpdate) {
Policy.getInstance().collapseExpandedCells();
Policy.getInstance().renderTemplate(policyData);
Policy.getInstance().updatePolicyVisibility();
-
- $('fetch-policies-button').disabled = false;
} else {
Policy.getInstance().renderTemplate(policyData);
}

Powered by Google App Engine
This is Rietveld 408576698