Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_PROFILE_POLICY_CONNECTOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // components. | 26 // components. |
| 27 class ProfilePolicyConnector : public BrowserContextKeyedService { | 27 class ProfilePolicyConnector : public BrowserContextKeyedService { |
| 28 public: | 28 public: |
| 29 ProfilePolicyConnector(); | 29 ProfilePolicyConnector(); |
| 30 virtual ~ProfilePolicyConnector(); | 30 virtual ~ProfilePolicyConnector(); |
| 31 | 31 |
| 32 // If |force_immediate_load| then disk caches will be loaded synchronously. | 32 // If |force_immediate_load| then disk caches will be loaded synchronously. |
| 33 void Init(bool force_immediate_load, | 33 void Init(bool force_immediate_load, |
| 34 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
| 35 const chromeos::User* user, | 35 const chromeos::User* user, |
| 36 #endif | |
| 36 SchemaRegistry* schema_registry, | 37 SchemaRegistry* schema_registry, |
| 37 #endif | |
| 38 CloudPolicyManager* user_cloud_policy_manager); | 38 CloudPolicyManager* user_cloud_policy_manager); |
| 39 | 39 |
| 40 void InitForTesting(scoped_ptr<PolicyService> service); | 40 void InitForTesting(scoped_ptr<PolicyService> service); |
| 41 | 41 |
| 42 // BrowserContextKeyedService: | 42 // BrowserContextKeyedService: |
| 43 virtual void Shutdown() OVERRIDE; | 43 virtual void Shutdown() OVERRIDE; |
| 44 | 44 |
| 45 // This is never NULL. | 45 // This is never NULL. |
| 46 PolicyService* policy_service() const { return policy_service_.get(); } | 46 PolicyService* policy_service() const { return policy_service_.get(); } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 #if defined(ENABLE_CONFIGURATION_POLICY) && defined(OS_CHROMEOS) | 49 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 50 #if defined(OS_CHROMEOS) | |
| 50 void InitializeDeviceLocalAccountPolicyProvider( | 51 void InitializeDeviceLocalAccountPolicyProvider( |
| 51 const std::string& username, | 52 const std::string& username, |
| 52 SchemaRegistry* schema_registry); | 53 SchemaRegistry* schema_registry); |
| 53 | 54 |
| 54 // Some of the user policy configuration affects browser global state, and | 55 // Some of the user policy configuration affects browser global state, and |
| 55 // can only come from one Profile. |is_primary_user_| is true if this | 56 // can only come from one Profile. |is_primary_user_| is true if this |
| 56 // connector belongs to the first signed-in Profile, and in that case that | 57 // connector belongs to the first signed-in Profile, and in that case that |
| 57 // Profile's policy is the one that affects global policy settings in | 58 // Profile's policy is the one that affects global policy settings in |
| 58 // local state. | 59 // local state. |
| 59 bool is_primary_user_; | 60 bool is_primary_user_; |
| 60 | 61 |
| 61 scoped_ptr<ConfigurationPolicyProvider> special_user_policy_provider_; | 62 scoped_ptr<ConfigurationPolicyProvider> special_user_policy_provider_; |
| 62 #endif | 63 #endif |
|
bartfab (slow)
2013/11/13 18:23:35
Nit: Add // defined(OS_CHROMEOS) to make it cleare
Joao da Silva
2013/11/14 08:23:42
Done.
| |
| 63 | 64 |
| 65 scoped_ptr<ConfigurationPolicyProvider> forwarding_policy_provider_; | |
| 66 #endif | |
|
bartfab (slow)
2013/11/13 18:23:35
Nit: Add // defined(ENABLE_CONFIGURATION_POLICY) t
Joao da Silva
2013/11/14 08:23:42
Done.
| |
| 67 | |
| 64 scoped_ptr<PolicyService> policy_service_; | 68 scoped_ptr<PolicyService> policy_service_; |
| 65 | 69 |
| 66 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); | 70 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); |
| 67 }; | 71 }; |
| 68 | 72 |
| 69 } // namespace policy | 73 } // namespace policy |
| 70 | 74 |
| 71 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 75 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| OLD | NEW |