| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 16 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
| 17 | 17 |
| 18 #if defined(OS_CHROMEOS) | |
| 19 #include "chromeos/dbus/dbus_method_call_status.h" | |
| 20 #endif | |
| 21 | |
| 22 class Profile; | 18 class Profile; |
| 23 | 19 |
| 24 namespace net { | 20 namespace net { |
| 25 class CertTrustAnchorProvider; | 21 class CertTrustAnchorProvider; |
| 26 } | 22 } |
| 27 | 23 |
| 28 namespace net { | 24 namespace net { |
| 29 class X509Certificate; | 25 class X509Certificate; |
| 30 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; | 26 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; |
| 31 } | 27 } |
| 32 | 28 |
| 29 namespace chromeos { |
| 30 class User; |
| 31 } |
| 32 |
| 33 namespace policy { | 33 namespace policy { |
| 34 | 34 |
| 35 class CloudPolicyManager; |
| 35 class ConfigurationPolicyProvider; | 36 class ConfigurationPolicyProvider; |
| 36 class UserNetworkConfigurationUpdater; | 37 class UserNetworkConfigurationUpdater; |
| 37 class PolicyService; | 38 class PolicyService; |
| 38 class PolicyCertVerifier; | 39 class PolicyCertVerifier; |
| 39 | 40 |
| 40 // A BrowserContextKeyedService that creates and manages the per-Profile policy | 41 // A BrowserContextKeyedService that creates and manages the per-Profile policy |
| 41 // components. | 42 // components. |
| 42 class ProfilePolicyConnector : public BrowserContextKeyedService { | 43 class ProfilePolicyConnector : public BrowserContextKeyedService { |
| 43 public: | 44 public: |
| 44 explicit ProfilePolicyConnector(Profile* profile); | 45 explicit ProfilePolicyConnector(Profile* profile); |
| 45 virtual ~ProfilePolicyConnector(); | 46 virtual ~ProfilePolicyConnector(); |
| 46 | 47 |
| 47 // If |force_immediate_load| then disk caches will be loaded synchronously. | 48 // If |force_immediate_load| then disk caches will be loaded synchronously. |
| 48 void Init(bool force_immediate_load); | 49 void Init(bool force_immediate_load, |
| 50 #if defined(OS_CHROMEOS) |
| 51 const chromeos::User* user, |
| 52 #endif |
| 53 CloudPolicyManager* user_cloud_policy_manager); |
| 49 | 54 |
| 50 void InitForTesting(scoped_ptr<PolicyService> service); | 55 void InitForTesting(scoped_ptr<PolicyService> service); |
| 51 | 56 |
| 52 // BrowserContextKeyedService: | 57 // BrowserContextKeyedService: |
| 53 virtual void Shutdown() OVERRIDE; | 58 virtual void Shutdown() OVERRIDE; |
| 54 | 59 |
| 55 // This is never NULL. | 60 // This is never NULL. |
| 56 PolicyService* policy_service() const { return policy_service_.get(); } | 61 PolicyService* policy_service() const { return policy_service_.get(); } |
| 57 | 62 |
| 58 #if defined(OS_CHROMEOS) | 63 #if defined(OS_CHROMEOS) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #endif // ENABLE_CONFIGURATION_POLICY | 111 #endif // ENABLE_CONFIGURATION_POLICY |
| 107 | 112 |
| 108 scoped_ptr<PolicyService> policy_service_; | 113 scoped_ptr<PolicyService> policy_service_; |
| 109 | 114 |
| 110 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); | 115 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); |
| 111 }; | 116 }; |
| 112 | 117 |
| 113 } // namespace policy | 118 } // namespace policy |
| 114 | 119 |
| 115 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 120 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
| OLD | NEW |