OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_POLICY_UI_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
14 #include "components/policy/core/browser/policy_error_map.h" | 15 #include "components/policy/core/browser/policy_error_map.h" |
15 #include "components/policy/core/common/policy_map.h" | 16 #include "components/policy/core/common/policy_map.h" |
16 #include "components/policy/core/common/policy_namespace.h" | 17 #include "components/policy/core/common/policy_namespace.h" |
17 #include "components/policy/core/common/policy_service.h" | 18 #include "components/policy/core/common/policy_service.h" |
18 #include "components/policy/core/common/schema_registry.h" | 19 #include "components/policy/core/common/schema_registry.h" |
19 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
20 #include "content/public/browser/web_ui_data_source.h" | 21 #include "content/public/browser/web_ui_data_source.h" |
21 #include "content/public/browser/web_ui_message_handler.h" | 22 #include "content/public/browser/web_ui_message_handler.h" |
22 | 23 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 103 |
103 void OnRefreshPoliciesDone() const; | 104 void OnRefreshPoliciesDone() const; |
104 | 105 |
105 policy::PolicyService* GetPolicyService() const; | 106 policy::PolicyService* GetPolicyService() const; |
106 | 107 |
107 std::string device_domain_; | 108 std::string device_domain_; |
108 | 109 |
109 // Providers that supply status dictionaries for user and device policy, | 110 // Providers that supply status dictionaries for user and device policy, |
110 // respectively. These are created on initialization time as appropriate for | 111 // respectively. These are created on initialization time as appropriate for |
111 // the platform (Chrome OS / desktop) and type of policy that is in effect. | 112 // the platform (Chrome OS / desktop) and type of policy that is in effect. |
112 scoped_ptr<CloudPolicyStatusProvider> user_status_provider_; | 113 std::unique_ptr<CloudPolicyStatusProvider> user_status_provider_; |
113 scoped_ptr<CloudPolicyStatusProvider> device_status_provider_; | 114 std::unique_ptr<CloudPolicyStatusProvider> device_status_provider_; |
114 | 115 |
115 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; | 116 base::WeakPtrFactory<PolicyUIHandler> weak_factory_; |
116 | 117 |
117 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); | 118 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); |
118 }; | 119 }; |
119 | 120 |
120 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ | 121 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_HANDLER_H_ |
OLD | NEW |