Chromium Code Reviews| 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..f26a8966b37c09636822c8d48382c11bd8b46d07 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_ptr_factory_; |
|
James Hawkins
2012/04/27 17:13:08
Optional nit: Precedence says this should be 'weak
Joao da Silva
2012/04/27 17:44:06
Done. Out of curiosity, the tools say:
# cd src/c
James Hawkins
2012/04/27 18:07:24
We did this grep earlier this week, but on the who
|
| + |
| DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); |
| }; |