OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_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 "chrome/browser/chromeos/settings/cros_settings.h" | 14 #include "chrome/browser/chromeos/settings/cros_settings.h" |
15 | 15 |
16 namespace policy { | 16 namespace policy { |
17 class CloudPolicyClient; | 17 class CloudPolicyClient; |
18 } | 18 } |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 class CrosSettings; | 22 class CrosSettings; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 // Reschedules a policy check (i.e. a call to Start) for a later time. | 87 // Reschedules a policy check (i.e. a call to Start) for a later time. |
88 // TODO(dkrahn): A better solution would be to wait for a dbus signal which | 88 // TODO(dkrahn): A better solution would be to wait for a dbus signal which |
89 // indicates the system is ready to process this task. See crbug.com/256845. | 89 // indicates the system is ready to process this task. See crbug.com/256845. |
90 void Reschedule(); | 90 void Reschedule(); |
91 | 91 |
92 CrosSettings* cros_settings_; | 92 CrosSettings* cros_settings_; |
93 policy::CloudPolicyClient* policy_client_; | 93 policy::CloudPolicyClient* policy_client_; |
94 CryptohomeClient* cryptohome_client_; | 94 CryptohomeClient* cryptohome_client_; |
95 AttestationFlow* attestation_flow_; | 95 AttestationFlow* attestation_flow_; |
96 scoped_ptr<AttestationFlow> default_attestation_flow_; | 96 std::unique_ptr<AttestationFlow> default_attestation_flow_; |
97 int num_retries_; | 97 int num_retries_; |
98 int retry_delay_; | 98 int retry_delay_; |
99 | 99 |
100 scoped_ptr<CrosSettings::ObserverSubscription> attestation_subscription_; | 100 std::unique_ptr<CrosSettings::ObserverSubscription> attestation_subscription_; |
101 | 101 |
102 // Note: This should remain the last member so it'll be destroyed and | 102 // Note: This should remain the last member so it'll be destroyed and |
103 // invalidate the weak pointers before any other members are destroyed. | 103 // invalidate the weak pointers before any other members are destroyed. |
104 base::WeakPtrFactory<AttestationPolicyObserver> weak_factory_; | 104 base::WeakPtrFactory<AttestationPolicyObserver> weak_factory_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(AttestationPolicyObserver); | 106 DISALLOW_COPY_AND_ASSIGN(AttestationPolicyObserver); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace attestation | 109 } // namespace attestation |
110 } // namespace chromeos | 110 } // namespace chromeos |
111 | 111 |
112 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ | 112 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_ATTESTATION_POLICY_OBSERVER_H_ |
OLD | NEW |