| OLD | NEW |
| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/task.h" | 14 #include "base/task.h" |
| 15 #include "chrome/browser/policy/cloud_policy_data_store.h" |
| 15 #include "chrome/browser/policy/enterprise_install_attributes.h" | 16 #include "chrome/browser/policy/enterprise_install_attributes.h" |
| 16 #include "content/common/notification_observer.h" | 17 #include "content/common/notification_observer.h" |
| 17 #include "content/common/notification_registrar.h" | 18 #include "content/common/notification_registrar.h" |
| 18 | 19 |
| 19 class FilePath; | 20 class FilePath; |
| 20 class TestingBrowserProcess; | 21 class TestingBrowserProcess; |
| 21 class TokenService; | 22 class TokenService; |
| 22 | 23 |
| 23 namespace policy { | 24 namespace policy { |
| 24 | 25 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 const NotificationDetails& details) OVERRIDE; | 128 const NotificationDetails& details) OVERRIDE; |
| 128 | 129 |
| 129 // Initializes the device cloud policy infrasturcture. | 130 // Initializes the device cloud policy infrasturcture. |
| 130 void InitializeDevicePolicy(); | 131 void InitializeDevicePolicy(); |
| 131 | 132 |
| 132 // Activates the device cloud policy subsystem. This will be posted as a task | 133 // Activates the device cloud policy subsystem. This will be posted as a task |
| 133 // from InitializeDevicePolicy since it needs to wait for the message loops to | 134 // from InitializeDevicePolicy since it needs to wait for the message loops to |
| 134 // be running. | 135 // be running. |
| 135 void InitializeDevicePolicySubsystem(); | 136 void InitializeDevicePolicySubsystem(); |
| 136 | 137 |
| 138 // Works out the user affiliation by checking the given |user_name| against |
| 139 // the installation attributes. |
| 140 policy::CloudPolicyDataStore::UserAffiliation GetUserAffiliation( |
| 141 const std::string& user_name); |
| 142 |
| 137 static BrowserPolicyConnector* CreateForTests(); | 143 static BrowserPolicyConnector* CreateForTests(); |
| 138 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); | 144 static ConfigurationPolicyProvider* CreateManagedPlatformProvider(); |
| 139 static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); | 145 static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider(); |
| 140 | 146 |
| 141 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; | 147 scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_; |
| 142 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; | 148 scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_; |
| 143 | 149 |
| 144 scoped_ptr<CloudPolicyProvider> managed_cloud_provider_; | 150 scoped_ptr<CloudPolicyProvider> managed_cloud_provider_; |
| 145 scoped_ptr<CloudPolicyProvider> recommended_cloud_provider_; | 151 scoped_ptr<CloudPolicyProvider> recommended_cloud_provider_; |
| 146 | 152 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 162 // Weak reference to the TokenService we are listening to for user cloud | 168 // Weak reference to the TokenService we are listening to for user cloud |
| 163 // policy authentication tokens. | 169 // policy authentication tokens. |
| 164 TokenService* token_service_; | 170 TokenService* token_service_; |
| 165 | 171 |
| 166 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 172 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
| 167 }; | 173 }; |
| 168 | 174 |
| 169 } // namespace policy | 175 } // namespace policy |
| 170 | 176 |
| 171 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 177 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| OLD | NEW |