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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h

Issue 2441653003: Enable fetching of admin policies for login screen apps (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
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_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 class AttestationPolicyObserver; 30 class AttestationPolicyObserver;
31 } 31 }
32 } 32 }
33 33
34 class PrefRegistrySimple; 34 class PrefRegistrySimple;
35 class PrefService; 35 class PrefService;
36 36
37 namespace policy { 37 namespace policy {
38 38
39 class DeviceCloudPolicyStoreChromeOS; 39 class DeviceCloudPolicyStoreChromeOS;
40 class ForwardingSchemaRegistry;
40 class HeartbeatScheduler; 41 class HeartbeatScheduler;
42 class SchemaRegistry;
41 class StatusUploader; 43 class StatusUploader;
42 class SystemLogUploader; 44 class SystemLogUploader;
43 45
44 enum class ZeroTouchEnrollmentMode { DISABLED, ENABLED, FORCED, HANDS_OFF }; 46 enum class ZeroTouchEnrollmentMode { DISABLED, ENABLED, FORCED, HANDS_OFF };
45 47
46 // CloudPolicyManager specialization for device policy on Chrome OS. 48 // CloudPolicyManager specialization for device policy on Chrome OS.
47 class DeviceCloudPolicyManagerChromeOS : public CloudPolicyManager { 49 class DeviceCloudPolicyManagerChromeOS : public CloudPolicyManager {
48 public: 50 public:
49 class Observer { 51 class Observer {
50 public: 52 public:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual void Disconnect(); 109 virtual void Disconnect();
108 110
109 DeviceCloudPolicyStoreChromeOS* device_store() { 111 DeviceCloudPolicyStoreChromeOS* device_store() {
110 return device_store_.get(); 112 return device_store_.get();
111 } 113 }
112 114
113 // Return the StatusUploader used to communicate device status to the 115 // Return the StatusUploader used to communicate device status to the
114 // policy server. 116 // policy server.
115 StatusUploader* GetStatusUploader() const { return status_uploader_.get(); } 117 StatusUploader* GetStatusUploader() const { return status_uploader_.get(); }
116 118
119 // Passes the pointer to the schema registry that corresponds to the signin
120 // profile.
121 //
122 // After this method is called, the component cloud policy manager becomes
123 // associated with this schema registry.
124 void SetSigninProfileSchemaRegistry(SchemaRegistry* schema_registry);
125
126 // Sets whether the component cloud policy service should be created.
127 // Defaults to true.
128 void set_is_component_policy_enabled_for_testing(
129 bool is_component_policy_enabled) {
130 is_component_policy_enabled_ = is_component_policy_enabled;
131 }
132
117 private: 133 private:
118 // Saves the state keys received from |session_manager_client_|. 134 // Saves the state keys received from |session_manager_client_|.
119 void OnStateKeysUpdated(); 135 void OnStateKeysUpdated();
120 136
121 // Initializes requisition settings at OOBE with values from VPD. 137 // Initializes requisition settings at OOBE with values from VPD.
122 void InitializeRequisition(); 138 void InitializeRequisition();
123 139
124 void NotifyConnected(); 140 void NotifyConnected();
125 void NotifyDisconnected(); 141 void NotifyDisconnected();
126 142
(...skipping 20 matching lines...) Expand all
147 scoped_refptr<base::SequencedTaskRunner> task_runner_; 163 scoped_refptr<base::SequencedTaskRunner> task_runner_;
148 164
149 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_; 165 ServerBackedStateKeysBroker::Subscription state_keys_update_subscription_;
150 166
151 // PrefService instance to read the policy refresh rate from. 167 // PrefService instance to read the policy refresh rate from.
152 PrefService* local_state_; 168 PrefService* local_state_;
153 169
154 std::unique_ptr<chromeos::attestation::AttestationPolicyObserver> 170 std::unique_ptr<chromeos::attestation::AttestationPolicyObserver>
155 attestation_policy_observer_; 171 attestation_policy_observer_;
156 172
173 // Wrapper schema registry that will track the signin profile schema registry
174 // once it is passed to this class.
175 std::unique_ptr<ForwardingSchemaRegistry>
176 signin_profile_forwarding_schema_registry_;
177
178 // Whether the component cloud policy service should be created.
179 bool is_component_policy_enabled_ = true;
180
157 base::ObserverList<Observer, true> observers_; 181 base::ObserverList<Observer, true> observers_;
158 182
159 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyManagerChromeOS); 183 DISALLOW_COPY_AND_ASSIGN(DeviceCloudPolicyManagerChromeOS);
160 }; 184 };
161 185
162 } // namespace policy 186 } // namespace policy
163 187
164 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H _ 188 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_CLOUD_POLICY_MANAGER_CHROMEOS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698