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 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_oper
ation.h" | 5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_oper
ation.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 callback_.Run(false); | 296 callback_.Run(false); |
297 return; | 297 return; |
298 } | 298 } |
299 | 299 |
300 std::string raw_session_key; | 300 std::string raw_session_key; |
301 session_key->GetRawKey(&raw_session_key); | 301 session_key->GetRawKey(&raw_session_key); |
302 | 302 |
303 challenge_creator_.reset(new ChallengeCreator( | 303 challenge_creator_.reset(new ChallengeCreator( |
304 user_key, | 304 user_key, |
305 raw_session_key, | 305 raw_session_key, |
306 kTpmPubKey, | 306 std::string(kTpmPubKey, arraysize(kTpmPubKey)), |
307 device, | 307 device, |
308 base::Bind(&EasyUnlockCreateKeysOperation::OnChallengeCreated, | 308 base::Bind(&EasyUnlockCreateKeysOperation::OnChallengeCreated, |
309 weak_ptr_factory_.GetWeakPtr(), | 309 weak_ptr_factory_.GetWeakPtr(), |
310 index))); | 310 index))); |
311 challenge_creator_->Start(); | 311 challenge_creator_->Start(); |
312 } | 312 } |
313 | 313 |
314 void EasyUnlockCreateKeysOperation::OnChallengeCreated(size_t index, | 314 void EasyUnlockCreateKeysOperation::OnChallengeCreated(size_t index, |
315 bool success) { | 315 bool success) { |
316 DCHECK_EQ(key_creation_index_, index); | 316 DCHECK_EQ(key_creation_index_, index); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 LOG(ERROR) << "Easy unlock failed to create key, code=" << return_code; | 384 LOG(ERROR) << "Easy unlock failed to create key, code=" << return_code; |
385 callback_.Run(false); | 385 callback_.Run(false); |
386 return; | 386 return; |
387 } | 387 } |
388 | 388 |
389 ++key_creation_index_; | 389 ++key_creation_index_; |
390 CreateKeyForDeviceAtIndex(key_creation_index_); | 390 CreateKeyForDeviceAtIndex(key_creation_index_); |
391 } | 391 } |
392 | 392 |
393 } // namespace chromeos | 393 } // namespace chromeos |
OLD | NEW |