| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // server and no response or error has yet been received. | 59 // server and no response or error has yet been received. |
| 60 bool IsPolicyRequestPending() const { return policy_request_pending_; } | 60 bool IsPolicyRequestPending() const { return policy_request_pending_; } |
| 61 | 61 |
| 62 // Tells the provider that the passed in token service reference is about to | 62 // Tells the provider that the passed in token service reference is about to |
| 63 // become invalid. | 63 // become invalid. |
| 64 void Shutdown(); | 64 void Shutdown(); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 class InitializeAfterIOThreadExistsTask; | 67 class InitializeAfterIOThreadExistsTask; |
| 68 | 68 |
| 69 // Returns the device management backend to use for backend requests, lazily | |
| 70 // creating a new one if one doesn't already exist. | |
| 71 DeviceManagementBackend* GetBackend(); | |
| 72 | |
| 73 // Called by constructors to perform shared initialization. Initialization | 69 // Called by constructors to perform shared initialization. Initialization |
| 74 // requiring the IOThread must not be performed directly in this method, | 70 // requiring the IOThread must not be performed directly in this method, |
| 75 // rather must be deferred until the IOThread is fully initialized. This is | 71 // rather must be deferred until the IOThread is fully initialized. This is |
| 76 // the case in InitializeAfterIOThreadExists. | 72 // the case in InitializeAfterIOThreadExists. |
| 77 void Initialize(); | 73 void Initialize(); |
| 78 | 74 |
| 79 // Called by a deferred task posted to the UI thread to complete the portion | 75 // Called by a deferred task posted to the UI thread to complete the portion |
| 80 // of initialization that requires the IOThread. | 76 // of initialization that requires the IOThread. |
| 81 void InitializeAfterIOThreadExists(); | 77 void InitializeAfterIOThreadExists(); |
| 82 | 78 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 104 NotificationRegistrar registrar_; | 100 NotificationRegistrar registrar_; |
| 105 FilePath storage_dir_; | 101 FilePath storage_dir_; |
| 106 bool policy_request_pending_; | 102 bool policy_request_pending_; |
| 107 | 103 |
| 108 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); | 104 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); |
| 109 }; | 105 }; |
| 110 | 106 |
| 111 } // namespace policy | 107 } // namespace policy |
| 112 | 108 |
| 113 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ | 109 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ |
| OLD | NEW |