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

Side by Side Diff: chrome/browser/policy/cloud_policy_manager.h

Issue 11299305: Break CloudPolicyRefreshScheduler's dependency on PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review feedback Created 8 years 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
« no previous file with comments | « no previous file | chrome/browser/policy/cloud_policy_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MANAGER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_MANAGER_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_MANAGER_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/api/prefs/pref_member.h"
13 #include "chrome/browser/policy/cloud_policy_store.h" 14 #include "chrome/browser/policy/cloud_policy_store.h"
14 #include "chrome/browser/policy/configuration_policy_provider.h" 15 #include "chrome/browser/policy/configuration_policy_provider.h"
15 16
16 class PrefService; 17 class PrefService;
17 18
18 namespace policy { 19 namespace policy {
19 20
20 class CloudPolicyClient; 21 class CloudPolicyClient;
21 class CloudPolicyRefreshScheduler; 22 class CloudPolicyRefreshScheduler;
22 class CloudPolicyService; 23 class CloudPolicyService;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const std::string& refresh_rate_pref); 70 const std::string& refresh_rate_pref);
70 71
71 // Check whether fully initialized and if so, publish policy by calling 72 // Check whether fully initialized and if so, publish policy by calling
72 // ConfigurationPolicyStore::UpdatePolicy(). 73 // ConfigurationPolicyStore::UpdatePolicy().
73 void CheckAndPublishPolicy(); 74 void CheckAndPublishPolicy();
74 75
75 private: 76 private:
76 // Completion handler for policy refresh operations. 77 // Completion handler for policy refresh operations.
77 void OnRefreshComplete(); 78 void OnRefreshComplete();
78 79
80 // Updates the refresh scheduler on refresh delay changes.
81 void UpdateRefreshDelay();
82
79 CloudPolicyStore* store_; 83 CloudPolicyStore* store_;
80 scoped_ptr<CloudPolicyClient> client_; 84 scoped_ptr<CloudPolicyClient> client_;
81 scoped_ptr<CloudPolicyService> service_; 85 scoped_ptr<CloudPolicyService> service_;
82 scoped_ptr<CloudPolicyRefreshScheduler> refresh_scheduler_; 86 scoped_ptr<CloudPolicyRefreshScheduler> refresh_scheduler_;
83 87
84 // Whether there's a policy refresh operation pending, in which case all 88 // Whether there's a policy refresh operation pending, in which case all
85 // policy update notifications are deferred until after it completes. 89 // policy update notifications are deferred until after it completes.
86 bool waiting_for_policy_refresh_; 90 bool waiting_for_policy_refresh_;
87 91
92 // Keeps track of the refresh delay pref.
93 scoped_ptr<IntegerPrefMember> refresh_delay_;
94
88 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager); 95 DISALLOW_COPY_AND_ASSIGN(CloudPolicyManager);
89 }; 96 };
90 97
91 } // namespace policy 98 } // namespace policy
92 99
93 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_MANAGER_H_ 100 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/cloud_policy_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698