Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_flow.cc

Issue 2529743002: Wait for the attestation to be ready (TPM being prepared for attestation) before trying to enroll. (Closed)
Patch Set: Slightly lower retry delay. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/platform_verification_flow.h" 5 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 PlatformVerificationFlow::PlatformVerificationFlow() 155 PlatformVerificationFlow::PlatformVerificationFlow()
156 : attestation_flow_(NULL), 156 : attestation_flow_(NULL),
157 async_caller_(cryptohome::AsyncMethodCaller::GetInstance()), 157 async_caller_(cryptohome::AsyncMethodCaller::GetInstance()),
158 cryptohome_client_(DBusThreadManager::Get()->GetCryptohomeClient()), 158 cryptohome_client_(DBusThreadManager::Get()->GetCryptohomeClient()),
159 delegate_(NULL), 159 delegate_(NULL),
160 timeout_delay_(base::TimeDelta::FromSeconds(kTimeoutInSeconds)) { 160 timeout_delay_(base::TimeDelta::FromSeconds(kTimeoutInSeconds)) {
161 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 161 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
162 std::unique_ptr<ServerProxy> attestation_ca_client(new AttestationCAClient()); 162 std::unique_ptr<ServerProxy> attestation_ca_client(new AttestationCAClient());
163 default_attestation_flow_.reset(new AttestationFlow( 163 default_attestation_flow_.reset(new AttestationFlow(
164 async_caller_, cryptohome_client_, std::move(attestation_ca_client))); 164 async_caller_, cryptohome_client_, std::move(attestation_ca_client),
165 base::TimeDelta::FromMinutes(1)));
165 attestation_flow_ = default_attestation_flow_.get(); 166 attestation_flow_ = default_attestation_flow_.get();
166 default_delegate_.reset(new DefaultDelegate()); 167 default_delegate_.reset(new DefaultDelegate());
167 delegate_ = default_delegate_.get(); 168 delegate_ = default_delegate_.get();
168 } 169 }
169 170
170 PlatformVerificationFlow::PlatformVerificationFlow( 171 PlatformVerificationFlow::PlatformVerificationFlow(
171 AttestationFlow* attestation_flow, 172 AttestationFlow* attestation_flow,
172 cryptohome::AsyncMethodCaller* async_caller, 173 cryptohome::AsyncMethodCaller* async_caller,
173 CryptohomeClient* cryptohome_client, 174 CryptohomeClient* cryptohome_client,
174 Delegate* delegate) 175 Delegate* delegate)
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 if (!operation_success) { 429 if (!operation_success) {
429 LOG(WARNING) << "PlatformVerificationFlow: Failed to renew platform " 430 LOG(WARNING) << "PlatformVerificationFlow: Failed to renew platform "
430 "certificate."; 431 "certificate.";
431 return; 432 return;
432 } 433 }
433 VLOG(1) << "Certificate successfully renewed."; 434 VLOG(1) << "Certificate successfully renewed.";
434 } 435 }
435 436
436 } // namespace attestation 437 } // namespace attestation
437 } // namespace chromeos 438 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698