| OLD | NEW |
| 1 // Copyright (c) 2011 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 #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/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/cloud_policy_data_store.h" | 14 #include "chrome/browser/policy/cloud_policy_constants.h" |
| 15 #include "chrome/browser/policy/configuration_policy_handler_list.h" | 15 #include "chrome/browser/policy/configuration_policy_handler_list.h" |
| 16 #include "chrome/browser/policy/enterprise_install_attributes.h" | 16 #include "chrome/browser/policy/enterprise_install_attributes.h" |
| 17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
| 19 | 19 |
| 20 class TestingBrowserProcess; | |
| 21 class TokenService; | 20 class TokenService; |
| 22 | 21 |
| 23 namespace policy { | 22 namespace policy { |
| 24 | 23 |
| 24 class CloudPolicyDataStore; |
| 25 class CloudPolicyProvider; | 25 class CloudPolicyProvider; |
| 26 class CloudPolicySubsystem; | 26 class CloudPolicySubsystem; |
| 27 class ConfigurationPolicyProvider; | 27 class ConfigurationPolicyProvider; |
| 28 class NetworkConfigurationUpdater; | 28 class NetworkConfigurationUpdater; |
| 29 class UserPolicyTokenCache; | 29 class UserPolicyTokenCache; |
| 30 | 30 |
| 31 // Manages the lifecycle of browser-global policy infrastructure, such as the | 31 // Manages the lifecycle of browser-global policy infrastructure, such as the |
| 32 // platform policy providers, device- and the user-cloud policy infrastructure. | 32 // platform policy providers, device- and the user-cloud policy infrastructure. |
| 33 // TODO(gfeher,mnissler): Factor out device and user specific methods into their | 33 // TODO(gfeher,mnissler): Factor out device and user specific methods into their |
| 34 // respective classes. | 34 // respective classes. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // isn't being used. | 116 // isn't being used. |
| 117 void RegisterForUserPolicy(const std::string& oauth_token); | 117 void RegisterForUserPolicy(const std::string& oauth_token); |
| 118 | 118 |
| 119 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const; | 119 const CloudPolicyDataStore* GetDeviceCloudPolicyDataStore() const; |
| 120 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const; | 120 const CloudPolicyDataStore* GetUserCloudPolicyDataStore() const; |
| 121 | 121 |
| 122 const ConfigurationPolicyHandlerList* GetHandlerList() const; | 122 const ConfigurationPolicyHandlerList* GetHandlerList() const; |
| 123 | 123 |
| 124 // Works out the user affiliation by checking the given |user_name| against | 124 // Works out the user affiliation by checking the given |user_name| against |
| 125 // the installation attributes. | 125 // the installation attributes. |
| 126 policy::CloudPolicyDataStore::UserAffiliation GetUserAffiliation( | 126 UserAffiliation GetUserAffiliation(const std::string& user_name); |
| 127 const std::string& user_name); | |
| 128 | 127 |
| 129 private: | 128 private: |
| 130 // content::NotificationObserver method overrides: | 129 // content::NotificationObserver method overrides: |
| 131 virtual void Observe(int type, | 130 virtual void Observe(int type, |
| 132 const content::NotificationSource& source, | 131 const content::NotificationSource& source, |
| 133 const content::NotificationDetails& details) OVERRIDE; | 132 const content::NotificationDetails& details) OVERRIDE; |
| 134 | 133 |
| 135 // Initializes the device cloud policy infrasturcture. | 134 // Initializes the device cloud policy infrasturcture. |
| 136 void InitializeDevicePolicy(); | 135 void InitializeDevicePolicy(); |
| 137 | 136 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 172 |
| 174 // Used to convert policies to preferences. | 173 // Used to convert policies to preferences. |
| 175 ConfigurationPolicyHandlerList handler_list_; | 174 ConfigurationPolicyHandlerList handler_list_; |
| 176 | 175 |
| 177 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); | 176 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); |
| 178 }; | 177 }; |
| 179 | 178 |
| 180 } // namespace policy | 179 } // namespace policy |
| 181 | 180 |
| 182 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ | 181 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ |
| OLD | NEW |