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

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: Rebased 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
« no previous file with comments | « chrome/browser/prefs/proxy_policy_unittest.cc ('k') | chrome/browser/ui/webui/policy_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/policy.js
diff --git a/chrome/browser/resources/policy.js b/chrome/browser/resources/policy.js
index 5c26d8b08b406c2e8d157b1d5afd87651dbc2ea8..21eba103608a1d32fb83c6150821aceaca95b25a 100644
--- a/chrome/browser/resources/policy.js
+++ b/chrome/browser/resources/policy.js
@@ -10,9 +10,6 @@ var policyDataFormat = {
// Whether any of the policies in 'policies' have a value.
'anyPoliciesSet': true,
- // 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,
'policies': [
{
'level': 'managed',
@@ -216,15 +213,18 @@ cr.define('policies', function() {
* by the policyDataFormat.
*/
Policy.returnData = function(policyData) {
- if (policyData.isPolicyUpdate) {
- Policy.getInstance().collapseExpandedCells();
- Policy.getInstance().renderTemplate(policyData);
- Policy.getInstance().updatePolicyVisibility();
+ var policy = Policy.getInstance();
+ policy.collapseExpandedCells();
+ policy.renderTemplate(policyData);
+ policy.updatePolicyVisibility();
+ };
- $('fetch-policies-button').disabled = false;
- } else {
- Policy.getInstance().renderTemplate(policyData);
- }
+ /**
+ * Called by the C++ PolicyUIHandler when a requested policy refresh has
+ * completed.
+ */
+ Policy.refreshDone = function() {
+ $('fetch-policies-button').disabled = false;
};
/**
« no previous file with comments | « chrome/browser/prefs/proxy_policy_unittest.cc ('k') | chrome/browser/ui/webui/policy_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698