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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // specified in |storage_dir| is used to store the device token and persisted | 63 // specified in |storage_dir| is used to store the device token and persisted |
64 // policy, rather than the user's data directory. | 64 // policy, rather than the user's data directory. |
65 DeviceManagementPolicyProvider( | 65 DeviceManagementPolicyProvider( |
66 const PolicyDefinitionList* policy_list, | 66 const PolicyDefinitionList* policy_list, |
67 DeviceManagementBackend* backend, | 67 DeviceManagementBackend* backend, |
68 const FilePath& storage_dir); | 68 const FilePath& storage_dir); |
69 | 69 |
70 private: | 70 private: |
71 class InitializeAfterIOThreadExistsTask; | 71 class InitializeAfterIOThreadExistsTask; |
72 | 72 |
73 // Returns the device management backend to use for backend requests, lazily | |
74 // creating a new one if one doesn't already exist. | |
75 DeviceManagementBackend* GetBackend(); | |
76 | |
77 // Called by constructors to perform shared initialization. Initialization | 73 // Called by constructors to perform shared initialization. Initialization |
78 // requiring the IOThread must not be performed directly in this method, | 74 // requiring the IOThread must not be performed directly in this method, |
79 // rather must be deferred until the IOThread is fully initialized. This is | 75 // rather must be deferred until the IOThread is fully initialized. This is |
80 // the case in InitializeAfterIOThreadExists. | 76 // the case in InitializeAfterIOThreadExists. |
81 void Initialize(); | 77 void Initialize(); |
82 | 78 |
83 // Called by a deferred task posted to the UI thread to complete the portion | 79 // Called by a deferred task posted to the UI thread to complete the portion |
84 // of initialization that requires the IOThread. | 80 // of initialization that requires the IOThread. |
85 void InitializeAfterIOThreadExists(); | 81 void InitializeAfterIOThreadExists(); |
86 | 82 |
(...skipping 20 matching lines...) Expand all Loading... |
107 NotificationRegistrar registrar_; | 103 NotificationRegistrar registrar_; |
108 FilePath storage_dir_; | 104 FilePath storage_dir_; |
109 bool policy_request_pending_; | 105 bool policy_request_pending_; |
110 | 106 |
111 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); | 107 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); |
112 }; | 108 }; |
113 | 109 |
114 } // namespace policy | 110 } // namespace policy |
115 | 111 |
116 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ | 112 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ |
OLD | NEW |