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 #include "chrome/browser/chromeos/attestation/attestation_policy_observer.h" | 5 #include "chrome/browser/chromeos/attestation/attestation_policy_observer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 } | 155 } |
156 | 156 |
157 if (!cryptohome_client_) | 157 if (!cryptohome_client_) |
158 cryptohome_client_ = DBusThreadManager::Get()->GetCryptohomeClient(); | 158 cryptohome_client_ = DBusThreadManager::Get()->GetCryptohomeClient(); |
159 | 159 |
160 if (!attestation_flow_) { | 160 if (!attestation_flow_) { |
161 std::unique_ptr<ServerProxy> attestation_ca_client( | 161 std::unique_ptr<ServerProxy> attestation_ca_client( |
162 new AttestationCAClient()); | 162 new AttestationCAClient()); |
163 default_attestation_flow_.reset(new AttestationFlow( | 163 default_attestation_flow_.reset(new AttestationFlow( |
164 cryptohome::AsyncMethodCaller::GetInstance(), cryptohome_client_, | 164 cryptohome::AsyncMethodCaller::GetInstance(), cryptohome_client_, |
165 std::move(attestation_ca_client))); | 165 std::move(attestation_ca_client), base::TimeDelta::FromMinutes(1))); |
apronin1
2016/12/05 19:25:50
here and other places where constructor is called:
| |
166 attestation_flow_ = default_attestation_flow_.get(); | 166 attestation_flow_ = default_attestation_flow_.get(); |
167 } | 167 } |
168 | 168 |
169 // Start a dbus call to check if an Enterprise Machine Key already exists. | 169 // Start a dbus call to check if an Enterprise Machine Key already exists. |
170 base::Closure on_does_exist = | 170 base::Closure on_does_exist = |
171 base::Bind(&AttestationPolicyObserver::GetExistingCertificate, | 171 base::Bind(&AttestationPolicyObserver::GetExistingCertificate, |
172 weak_factory_.GetWeakPtr()); | 172 weak_factory_.GetWeakPtr()); |
173 base::Closure on_does_not_exist = | 173 base::Closure on_does_not_exist = |
174 base::Bind(&AttestationPolicyObserver::GetNewCertificate, | 174 base::Bind(&AttestationPolicyObserver::GetNewCertificate, |
175 weak_factory_.GetWeakPtr()); | 175 weak_factory_.GetWeakPtr()); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
314 base::Bind(&AttestationPolicyObserver::Start, | 314 base::Bind(&AttestationPolicyObserver::Start, |
315 weak_factory_.GetWeakPtr()), | 315 weak_factory_.GetWeakPtr()), |
316 base::TimeDelta::FromSeconds(retry_delay_)); | 316 base::TimeDelta::FromSeconds(retry_delay_)); |
317 } else { | 317 } else { |
318 LOG(WARNING) << "AttestationPolicyObserver: Retry limit exceeded."; | 318 LOG(WARNING) << "AttestationPolicyObserver: Retry limit exceeded."; |
319 } | 319 } |
320 } | 320 } |
321 | 321 |
322 } // namespace attestation | 322 } // namespace attestation |
323 } // namespace chromeos | 323 } // namespace chromeos |
OLD | NEW |