OLD | NEW |
---|---|
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_BROWSER_POLICY_CONNECTOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
13 #include "chrome/browser/policy/cloud_policy_constants.h" | 14 #include "chrome/browser/policy/cloud_policy_constants.h" |
14 #include "chrome/browser/policy/configuration_policy_handler_list.h" | 15 #include "chrome/browser/policy/configuration_policy_handler_list.h" |
15 #include "chrome/browser/policy/proxy_policy_provider.h" | 16 #include "chrome/browser/policy/proxy_policy_provider.h" |
16 | 17 |
17 class PrefServiceSimple; | 18 class PrefServiceSimple; |
18 class Profile; | 19 class Profile; |
19 | 20 |
20 namespace policy { | 21 namespace policy { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 return user_cloud_policy_manager_.get(); | 118 return user_cloud_policy_manager_.get(); |
118 } | 119 } |
119 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { | 120 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { |
120 return device_local_account_policy_service_.get(); | 121 return device_local_account_policy_service_.get(); |
121 } | 122 } |
122 EnterpriseInstallAttributes* GetInstallAttributes() { | 123 EnterpriseInstallAttributes* GetInstallAttributes() { |
123 return install_attributes_.get(); | 124 return install_attributes_.get(); |
124 } | 125 } |
125 #endif | 126 #endif |
126 | 127 |
128 // Sets a root path override for tests. Absolute paths used to construct | |
129 // internal objects will be relative to |root_path|. | |
130 static void SetRootPathForTesting(const FilePath::CharType* root_path); | |
Joao da Silva
2013/02/06 00:34:38
Better ideas welcome :-)
I don't totally dislike
Mattias Nissler (ping if slow)
2013/02/06 17:58:25
How about getting the path from PathService and in
Joao da Silva
2013/02/07 16:32:00
Good idea, done.
| |
131 | |
127 // Allows setting a DeviceManagementService (for injecting mocks in | 132 // Allows setting a DeviceManagementService (for injecting mocks in |
128 // unit tests). | 133 // unit tests). |
129 void SetDeviceManagementServiceForTesting( | 134 void SetDeviceManagementServiceForTesting( |
130 scoped_ptr<DeviceManagementService> service); | 135 scoped_ptr<DeviceManagementService> service); |
131 | 136 |
132 // Sets a |provider| that will be included in PolicyServices returned by | 137 // Sets a |provider| that will be included in PolicyServices returned by |
133 // CreatePolicyService. This is a static method because local state is | 138 // CreatePolicyService. This is a static method because local state is |
134 // created immediately after the connector, and tests don't have a chance to | 139 // created immediately after the connector, and tests don't have a chance to |
135 // inject the provider otherwise. |provider| must outlive the connector, and | 140 // inject the provider otherwise. |provider| must outlive the connector, and |
136 // its ownership is not taken though the connector will initialize and shut it | 141 // its ownership is not taken though the connector will initialize and shut it |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 scoped_ptr<AppPackUpdater> app_pack_updater_; | 217 scoped_ptr<AppPackUpdater> app_pack_updater_; |
213 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; | 218 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; |
214 #endif | 219 #endif |
215 | 220 |
216 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 221 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
217 }; | 222 }; |
218 | 223 |
219 } // namespace policy | 224 } // namespace policy |
220 | 225 |
221 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 226 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
OLD | NEW |