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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/prefs/pref_member.h" 10 #include "chrome/browser/prefs/pref_member.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 }; 73 };
74 74
75 CloudPolicySubsystem(CloudPolicyIdentityStrategy* identity_strategy, 75 CloudPolicySubsystem(CloudPolicyIdentityStrategy* identity_strategy,
76 CloudPolicyCacheBase* policy_cache); 76 CloudPolicyCacheBase* policy_cache);
77 virtual ~CloudPolicySubsystem(); 77 virtual ~CloudPolicySubsystem();
78 78
79 // net::NetworkChangeNotifier::IPAddressObserver: 79 // net::NetworkChangeNotifier::IPAddressObserver:
80 virtual void OnIPAddressChanged() OVERRIDE; 80 virtual void OnIPAddressChanged() OVERRIDE;
81 81
82 // Initializes the subsystem. 82 // Initializes the subsystem.
83 void Initialize(PrefService* prefs, 83 void Initialize(const char* policy_refresh_name,
Mattias Nissler (ping if slow) 2011/05/13 09:45:03 it's not a policy name but a pref name.
sfeuz 2011/05/17 14:27:42 Done.
84 net::URLRequestContextGetter* request_context); 84 net::URLRequestContextGetter* request_context);
85 85
86 // Shuts the subsystem down. This must be called before threading and network 86 // Shuts the subsystem down. This must be called before threading and network
87 // infrastructure goes away. 87 // infrastructure goes away.
88 void Shutdown(); 88 void Shutdown();
89 89
90 // Returns the externally visible state and corresponding error details. 90 // Returns the externally visible state and corresponding error details.
91 PolicySubsystemState state(); 91 PolicySubsystemState state();
92 ErrorDetails error_details(); 92 ErrorDetails error_details();
93 93
(...skipping 14 matching lines...) Expand all
108 // Returns a weak pointer to this subsystem's PolicyNotifier. 108 // Returns a weak pointer to this subsystem's PolicyNotifier.
109 PolicyNotifier* notifier() { 109 PolicyNotifier* notifier() {
110 return notifier_.get(); 110 return notifier_.get();
111 } 111 }
112 112
113 // NotificationObserver overrides. 113 // NotificationObserver overrides.
114 virtual void Observe(NotificationType type, 114 virtual void Observe(NotificationType type,
115 const NotificationSource& source, 115 const NotificationSource& source,
116 const NotificationDetails& details); 116 const NotificationDetails& details);
117 117
118 // The pref service that controls the refresh rate.
119 PrefService* prefs_;
120
121 // Tracks the pref value for the policy refresh rate. 118 // Tracks the pref value for the policy refresh rate.
122 IntegerPrefMember policy_refresh_rate_; 119 IntegerPrefMember policy_refresh_rate_;
123 120
124 // Cloud policy infrastructure stuff. 121 // Cloud policy infrastructure stuff.
125 scoped_ptr<PolicyNotifier> notifier_; 122 scoped_ptr<PolicyNotifier> notifier_;
126 scoped_ptr<DeviceManagementService> device_management_service_; 123 scoped_ptr<DeviceManagementService> device_management_service_;
127 scoped_ptr<DeviceTokenFetcher> device_token_fetcher_; 124 scoped_ptr<DeviceTokenFetcher> device_token_fetcher_;
128 scoped_ptr<CloudPolicyCacheBase> cloud_policy_cache_; 125 scoped_ptr<CloudPolicyCacheBase> cloud_policy_cache_;
129 scoped_ptr<CloudPolicyController> cloud_policy_controller_; 126 scoped_ptr<CloudPolicyController> cloud_policy_controller_;
130 127
131 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem); 128 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem);
132 }; 129 };
133 130
134 } // namespace policy 131 } // namespace policy
135 132
136 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ 133 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698