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/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" | 5 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 EPKPChallengeKeyBase::EPKPChallengeKeyBase() | 83 EPKPChallengeKeyBase::EPKPChallengeKeyBase() |
84 : cryptohome_client_( | 84 : cryptohome_client_( |
85 chromeos::DBusThreadManager::Get()->GetCryptohomeClient()), | 85 chromeos::DBusThreadManager::Get()->GetCryptohomeClient()), |
86 async_caller_(cryptohome::AsyncMethodCaller::GetInstance()), | 86 async_caller_(cryptohome::AsyncMethodCaller::GetInstance()), |
87 install_attributes_(g_browser_process->platform_part() | 87 install_attributes_(g_browser_process->platform_part() |
88 ->browser_policy_connector_chromeos() | 88 ->browser_policy_connector_chromeos() |
89 ->GetInstallAttributes()) { | 89 ->GetInstallAttributes()) { |
90 std::unique_ptr<chromeos::attestation::ServerProxy> ca_client( | 90 std::unique_ptr<chromeos::attestation::ServerProxy> ca_client( |
91 new chromeos::attestation::AttestationCAClient()); | 91 new chromeos::attestation::AttestationCAClient()); |
92 default_attestation_flow_.reset(new chromeos::attestation::AttestationFlow( | 92 default_attestation_flow_.reset(new chromeos::attestation::AttestationFlow( |
93 async_caller_, cryptohome_client_, std::move(ca_client))); | 93 async_caller_, cryptohome_client_, std::move(ca_client), |
| 94 base::TimeDelta::Max())); |
94 attestation_flow_ = default_attestation_flow_.get(); | 95 attestation_flow_ = default_attestation_flow_.get(); |
95 } | 96 } |
96 | 97 |
97 EPKPChallengeKeyBase::EPKPChallengeKeyBase( | 98 EPKPChallengeKeyBase::EPKPChallengeKeyBase( |
98 chromeos::CryptohomeClient* cryptohome_client, | 99 chromeos::CryptohomeClient* cryptohome_client, |
99 cryptohome::AsyncMethodCaller* async_caller, | 100 cryptohome::AsyncMethodCaller* async_caller, |
100 chromeos::attestation::AttestationFlow* attestation_flow, | 101 chromeos::attestation::AttestationFlow* attestation_flow, |
101 chromeos::InstallAttributes* install_attributes) : | 102 chromeos::InstallAttributes* install_attributes) : |
102 cryptohome_client_(cryptohome_client), | 103 cryptohome_client_(cryptohome_client), |
103 async_caller_(async_caller), | 104 async_caller_(async_caller), |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 std::string encoded_response; | 635 std::string encoded_response; |
635 base::Base64Encode(data, &encoded_response); | 636 base::Base64Encode(data, &encoded_response); |
636 Respond(ArgumentList( | 637 Respond(ArgumentList( |
637 api_epkp::ChallengeUserKey::Results::Create(encoded_response))); | 638 api_epkp::ChallengeUserKey::Results::Create(encoded_response))); |
638 } else { | 639 } else { |
639 Respond(Error(data)); | 640 Respond(Error(data)); |
640 } | 641 } |
641 } | 642 } |
642 | 643 |
643 } // namespace extensions | 644 } // namespace extensions |
OLD | NEW |