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

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: 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/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..f20a285d4fe7bc13614bf3694e80726579220845 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"
@@ -40,8 +41,9 @@ class PolicyUIHandler : public content::WebUIMessageHandler,
// 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);
+ // javascript message and to false otherwise. |is_refresh_done| should be set
+ // to true if a previously requested policy refresh has completed.
+ void SendDataToUI(bool is_policy_update, bool is_refresh_done);
// 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_;
+
DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler);
};

Powered by Google App Engine
This is Rietveld 408576698