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

Unified Diff: chrome/browser/ui/webui/policy_ui.h

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/resources/policy.js ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui.h
diff --git a/chrome/browser/ui/webui/policy_ui.h b/chrome/browser/ui/webui/policy_ui.h
index 34e58877023b99bcb1db3efbc1a29473c1cf05a0..38192d50d865741a323636122dd85ea02708a22e 100644
--- a/chrome/browser/ui/webui/policy_ui.h
+++ b/chrome/browser/ui/webui/policy_ui.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "chrome/browser/policy/cloud_policy_subsystem.h"
#include "chrome/browser/policy/configuration_policy_reader.h"
@@ -38,10 +39,11 @@ class PolicyUIHandler : public content::WebUIMessageHandler,
// Callback for the "fetchPolicy" message. The parameter |args| is unused.
void HandleFetchPolicy(const ListValue* args);
- // Send requested data to UI. |is_policy_update| should be set to true when
- // policy data is pushed to the UI without having been requested by a
- // javascript message and to false otherwise.
- void SendDataToUI(bool is_policy_update);
+ // Callback for completion of a RefreshPolicies call.
+ void OnRefreshDone();
+
+ // Sends policy data to UI.
+ void SendDataToUI();
// Returns a DictionaryValue pointer containing information about the status
// of the policy system. The caller acquires ownership of the returned
@@ -66,6 +68,9 @@ class PolicyUIHandler : public content::WebUIMessageHandler,
scoped_ptr<policy::PolicyStatus> policy_status_;
+ // Used to post a callback to RefreshPolicies with a WeakPtr to |this|.
+ base::WeakPtrFactory<PolicyUIHandler> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler);
};
« no previous file with comments | « chrome/browser/resources/policy.js ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698