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

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: Temporarily added user policy refresh rate to both local_state and profile prefs. Rebased. Created 9 years, 7 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/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..61de8d5a831962e7baa52f139c6c8a453a5604d3 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, int delay_milliseconds);
Mattias Nissler (ping if slow) 2011/05/31 12:35:53 why are you changing the delay parameter back from
sfeuz 2011/05/31 12:52:18 Not intended. Done.
// 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_;
+ // The preference name of the refresh rate we listen to.
Mattias Nissler (ping if slow) 2011/05/31 12:35:53 Make the comment more accurate, like "Name of the
sfeuz 2011/05/31 12:52:18 Done.
+ const char* refresh_pref_name_;
- // Tracks the pref value for the policy refresh rate.
- IntegerPrefMember policy_refresh_rate_;
+ PrefChangeRegistrar pref_change_registrar_;
Mattias Nissler (ping if slow) 2011/05/31 12:35:53 Why have both the name and the registrar? It seems
sfeuz 2011/05/31 12:52:18 IntegerPrefMember seems like overkill since we onl
Mattias Nissler (ping if slow) 2011/05/31 13:01:05 I don't see why IntegerPrefMember would be overkil
// Weak reference to pass on to |cloud_policy_controller_| on creation.
CloudPolicyIdentityStrategy* identity_strategy_;

Powered by Google App Engine
This is Rietveld 408576698