OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/callback.h" | 11 #include "base/callback.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "chrome/browser/chromeos/settings/cros_settings.h" | 15 #include "chrome/browser/chromeos/settings/cros_settings.h" |
16 | 16 |
17 namespace policy { | 17 namespace policy { |
18 class BrowserPolicyConnectorChromeOS; | 18 class BrowserPolicyConnectorChromeOS; |
19 } | 19 } |
20 | 20 |
21 namespace user_manager { | 21 namespace user_manager { |
22 class UserManager; | 22 class UserManager; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 void UpdateFromCrosSettings(); | 115 void UpdateFromCrosSettings(); |
116 | 116 |
117 Delegate* delegate_; | 117 Delegate* delegate_; |
118 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_; | 118 policy::BrowserPolicyConnectorChromeOS* browser_policy_connector_; |
119 CrosSettings* cros_settings_; | 119 CrosSettings* cros_settings_; |
120 user_manager::UserManager* user_manager_; | 120 user_manager::UserManager* user_manager_; |
121 | 121 |
122 base::ObserverList<Observer> observers_; | 122 base::ObserverList<Observer> observers_; |
123 | 123 |
124 scoped_ptr<CrosSettings::ObserverSubscription> device_disabled_subscription_; | 124 std::unique_ptr<CrosSettings::ObserverSubscription> |
125 scoped_ptr<CrosSettings::ObserverSubscription> disabled_message_subscription_; | 125 device_disabled_subscription_; |
| 126 std::unique_ptr<CrosSettings::ObserverSubscription> |
| 127 disabled_message_subscription_; |
126 | 128 |
127 // Indicates whether the device was disabled when the cros settings were last | 129 // Indicates whether the device was disabled when the cros settings were last |
128 // read. | 130 // read. |
129 bool device_disabled_; | 131 bool device_disabled_; |
130 | 132 |
131 // A cached copy of the domain that owns the device. | 133 // A cached copy of the domain that owns the device. |
132 std::string enrollment_domain_; | 134 std::string enrollment_domain_; |
133 | 135 |
134 // A cached copy of the message to show on the device disabled screen. | 136 // A cached copy of the message to show on the device disabled screen. |
135 std::string disabled_message_; | 137 std::string disabled_message_; |
136 | 138 |
137 base::WeakPtrFactory<DeviceDisablingManager> weak_factory_; | 139 base::WeakPtrFactory<DeviceDisablingManager> weak_factory_; |
138 | 140 |
139 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManager); | 141 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManager); |
140 }; | 142 }; |
141 | 143 |
142 } // namespace system | 144 } // namespace system |
143 } // namespace chromeos | 145 } // namespace chromeos |
144 | 146 |
145 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ | 147 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_DEVICE_DISABLING_MANAGER_H_ |
OLD | NEW |