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

Unified Diff: chrome/browser/policy/cloud_policy_subsystem.h

Issue 7014036: Split the policy refresh rate preference into user- and device-policy refresh rate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 9 years, 6 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/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_subsystem.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_subsystem.h
diff --git a/chrome/browser/policy/cloud_policy_subsystem.h b/chrome/browser/policy/cloud_policy_subsystem.h
index 5ecfdaa43cbd303622b3235678953cc44c586378..2e6e608d88846f66eeb8dde4ef85eeaed6deea2e 100644
--- a/chrome/browser/policy/cloud_policy_subsystem.h
+++ b/chrome/browser/policy/cloud_policy_subsystem.h
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_member.h"
+#include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/common/notification_observer.h"
#include "net/base/network_change_notifier.h"
@@ -75,9 +76,9 @@ class CloudPolicySubsystem
// net::NetworkChangeNotifier::IPAddressObserver:
virtual void OnIPAddressChanged() OVERRIDE;
- // Initializes the subsystem.The first network request will only be made
+ // Initializes the subsystem. The first network request will only be made
// after |delay_milliseconds|.
- void Initialize(PrefService* prefs, int64 delay_milliseconds);
+ void Initialize(const char* refresh_pref_name, int64 delay_milliseconds);
// Shuts the subsystem down. This must be called before threading and network
// infrastructure goes away.
@@ -102,7 +103,7 @@ class CloudPolicySubsystem
private:
// Updates the policy controller with a new refresh rate value.
- void UpdatePolicyRefreshRate();
+ void UpdatePolicyRefreshRate(int64 refresh_rate);
// Returns a weak pointer to this subsystem's PolicyNotifier.
PolicyNotifier* notifier() {
@@ -114,11 +115,10 @@ class CloudPolicySubsystem
const NotificationSource& source,
const NotificationDetails& details);
- // The pref service that controls the refresh rate.
- PrefService* prefs_;
+ // Name of the preference to read the refresh rate from.
+ const char* refresh_pref_name_;
- // Tracks the pref value for the policy refresh rate.
- IntegerPrefMember policy_refresh_rate_;
+ PrefChangeRegistrar pref_change_registrar_;
// Weak reference to pass on to |cloud_policy_controller_| on creation.
CloudPolicyIdentityStrategy* identity_strategy_;
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_subsystem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698