| 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_CLOUD_POLICY_SUBSYSTEM_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/prefs/pref_member.h" | 10 #include "chrome/browser/prefs/pref_member.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 CloudPolicySubsystem(CloudPolicyIdentityStrategy* identity_strategy, | 71 CloudPolicySubsystem(CloudPolicyIdentityStrategy* identity_strategy, |
| 72 CloudPolicyCacheBase* policy_cache); | 72 CloudPolicyCacheBase* policy_cache); |
| 73 virtual ~CloudPolicySubsystem(); | 73 virtual ~CloudPolicySubsystem(); |
| 74 | 74 |
| 75 // net::NetworkChangeNotifier::IPAddressObserver: | 75 // net::NetworkChangeNotifier::IPAddressObserver: |
| 76 virtual void OnIPAddressChanged() OVERRIDE; | 76 virtual void OnIPAddressChanged() OVERRIDE; |
| 77 | 77 |
| 78 // Initializes the subsystem.The first network request will only be made | 78 // Initializes the subsystem.The first network request will only be made |
| 79 // after |delay_milliseconds|. | 79 // after |delay_milliseconds|. |
| 80 void Initialize(PrefService* prefs, int delay_milliseconds); | 80 void Initialize(PrefService* prefs, int64 delay_milliseconds); |
| 81 | 81 |
| 82 // Shuts the subsystem down. This must be called before threading and network | 82 // Shuts the subsystem down. This must be called before threading and network |
| 83 // infrastructure goes away. | 83 // infrastructure goes away. |
| 84 void Shutdown(); | 84 void Shutdown(); |
| 85 | 85 |
| 86 // Returns the externally visible state and corresponding error details. | 86 // Returns the externally visible state and corresponding error details. |
| 87 PolicySubsystemState state(); | 87 PolicySubsystemState state(); |
| 88 ErrorDetails error_details(); | 88 ErrorDetails error_details(); |
| 89 | 89 |
| 90 // Stops all auto-retrying error handling behavior inside the policy | 90 // Stops all auto-retrying error handling behavior inside the policy |
| 91 // subsystem. | 91 // subsystem. |
| 92 void StopAutoRetry(); | 92 void StopAutoRetry(); |
| 93 | 93 |
| 94 ConfigurationPolicyProvider* GetManagedPolicyProvider(); | 94 ConfigurationPolicyProvider* GetManagedPolicyProvider(); |
| 95 ConfigurationPolicyProvider* GetRecommendedPolicyProvider(); | 95 ConfigurationPolicyProvider* GetRecommendedPolicyProvider(); |
| 96 | 96 |
| 97 // Registers cloud policy related prefs. | 97 // Registers cloud policy related prefs. |
| 98 static void RegisterPrefs(PrefService* pref_service); | 98 static void RegisterPrefs(PrefService* pref_service); |
| 99 | 99 |
| 100 // Schedule initialization of the policy backend service. | 100 // Schedule initialization of the policy backend service. |
| 101 void ScheduleServiceInitialization(int delay_milliseconds); | 101 void ScheduleServiceInitialization(int64 delay_milliseconds); |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 // Updates the policy controller with a new refresh rate value. | 104 // Updates the policy controller with a new refresh rate value. |
| 105 void UpdatePolicyRefreshRate(); | 105 void UpdatePolicyRefreshRate(); |
| 106 | 106 |
| 107 // Returns a weak pointer to this subsystem's PolicyNotifier. | 107 // Returns a weak pointer to this subsystem's PolicyNotifier. |
| 108 PolicyNotifier* notifier() { | 108 PolicyNotifier* notifier() { |
| 109 return notifier_.get(); | 109 return notifier_.get(); |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 129 scoped_ptr<DeviceTokenFetcher> device_token_fetcher_; | 129 scoped_ptr<DeviceTokenFetcher> device_token_fetcher_; |
| 130 scoped_ptr<CloudPolicyCacheBase> cloud_policy_cache_; | 130 scoped_ptr<CloudPolicyCacheBase> cloud_policy_cache_; |
| 131 scoped_ptr<CloudPolicyController> cloud_policy_controller_; | 131 scoped_ptr<CloudPolicyController> cloud_policy_controller_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem); | 133 DISALLOW_COPY_AND_ASSIGN(CloudPolicySubsystem); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace policy | 136 } // namespace policy |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ | 138 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_SUBSYSTEM_H_ |
| OLD | NEW |