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

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

Issue 438493002: Added ConsumerManagementService class to handle enroll state and device owner info in boot lockbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signin
Patch Set: Fixed the broken test. Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/browser_policy_connector_chromeos.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/policy/chrome_browser_policy_connector.h" 14 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
15 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 15 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
16 16
17 class PrefRegistrySimple; 17 class PrefRegistrySimple;
18 class PrefService; 18 class PrefService;
19 19
20 namespace net { 20 namespace net {
21 class URLRequestContextGetter; 21 class URLRequestContextGetter;
22 } 22 }
23 23
24 namespace policy { 24 namespace policy {
25 25
26 class AppPackUpdater; 26 class AppPackUpdater;
27 class ConsumerManagementService;
27 class DeviceCloudPolicyInitializer; 28 class DeviceCloudPolicyInitializer;
28 class DeviceCloudPolicyInvalidator; 29 class DeviceCloudPolicyInvalidator;
29 class DeviceCloudPolicyManagerChromeOS; 30 class DeviceCloudPolicyManagerChromeOS;
30 class DeviceLocalAccountPolicyService; 31 class DeviceLocalAccountPolicyService;
31 class DeviceManagementService; 32 class DeviceManagementService;
32 class EnterpriseInstallAttributes; 33 class EnterpriseInstallAttributes;
33 class NetworkConfigurationUpdater; 34 class NetworkConfigurationUpdater;
34 class ProxyPolicyProvider; 35 class ProxyPolicyProvider;
35 class ServerBackedStateKeysBroker; 36 class ServerBackedStateKeysBroker;
36 37
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // policy provider that forwards policies from a delegate policy provider. 99 // policy provider that forwards policies from a delegate policy provider.
99 // This call can be used to set the user policy provider as that delegate 100 // This call can be used to set the user policy provider as that delegate
100 // once the Profile is ready, so that user policies can also affect local 101 // once the Profile is ready, so that user policies can also affect local
101 // state preferences. 102 // state preferences.
102 // Only one user policy provider can be set as a delegate at a time, and any 103 // Only one user policy provider can be set as a delegate at a time, and any
103 // previously set delegate is removed. Passing NULL removes the current 104 // previously set delegate is removed. Passing NULL removes the current
104 // delegate, if there is one. 105 // delegate, if there is one.
105 void SetUserPolicyDelegate(ConfigurationPolicyProvider* user_policy_provider); 106 void SetUserPolicyDelegate(ConfigurationPolicyProvider* user_policy_provider);
106 107
107 // Returns the device management service for consumer management. 108 // Returns the device management service for consumer management.
108 DeviceManagementService* consumer_device_management_service() const { 109 DeviceManagementService* GetDeviceManagementServiceForConsumer() const {
109 return consumer_device_management_service_.get(); 110 return consumer_device_management_service_.get();
110 } 111 }
111 112
113 ConsumerManagementService* GetConsumerManagementService() const {
114 return consumer_management_service_.get();
115 }
116
112 // Sets the install attributes for testing. Must be called before the browser 117 // Sets the install attributes for testing. Must be called before the browser
113 // is created. RemoveInstallAttributesForTesting must be called after the test 118 // is created. RemoveInstallAttributesForTesting must be called after the test
114 // to free the attributes. 119 // to free the attributes.
115 static void SetInstallAttributesForTesting( 120 static void SetInstallAttributesForTesting(
116 EnterpriseInstallAttributes* attributes); 121 EnterpriseInstallAttributes* attributes);
117 static void RemoveInstallAttributesForTesting(); 122 static void RemoveInstallAttributesForTesting();
118 123
119 // Registers device refresh rate pref. 124 // Registers device refresh rate pref.
120 static void RegisterPrefs(PrefRegistrySimple* registry); 125 static void RegisterPrefs(PrefRegistrySimple* registry);
121 126
(...skipping 17 matching lines...) Expand all
139 // provider of the primary profile as the delegate of the ProxyPolicyProvider, 144 // provider of the primary profile as the delegate of the ProxyPolicyProvider,
140 // after login. 145 // after login.
141 // The provider is owned by the base class; this field is just a typed weak 146 // The provider is owned by the base class; this field is just a typed weak
142 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate(). 147 // pointer to get to the ProxyPolicyProvider at SetUserPolicyDelegate().
143 ProxyPolicyProvider* global_user_cloud_policy_provider_; 148 ProxyPolicyProvider* global_user_cloud_policy_provider_;
144 149
145 scoped_ptr<AppPackUpdater> app_pack_updater_; 150 scoped_ptr<AppPackUpdater> app_pack_updater_;
146 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; 151 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_;
147 152
148 scoped_ptr<DeviceManagementService> consumer_device_management_service_; 153 scoped_ptr<DeviceManagementService> consumer_device_management_service_;
154 scoped_ptr<ConsumerManagementService> consumer_management_service_;
149 155
150 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; 156 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_;
151 157
152 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); 158 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS);
153 }; 159 };
154 160
155 } // namespace policy 161 } // namespace policy
156 162
157 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 163 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698