| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/attestation/attestation_flow.h" | 5 #include "chromeos/attestation/attestation_flow.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "chromeos/cryptohome/async_method_caller.h" | 10 #include "chromeos/cryptohome/async_method_caller.h" |
| 9 #include "chromeos/dbus/cryptohome_client.h" | 11 #include "chromeos/dbus/cryptohome_client.h" |
| 10 | 12 |
| 11 namespace chromeos { | 13 namespace chromeos { |
| 12 namespace attestation { | 14 namespace attestation { |
| 13 | 15 |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 // Redirects to one of three callbacks based on a boolean value and dbus call | 18 // Redirects to one of three callbacks based on a boolean value and dbus call |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return ""; | 82 return ""; |
| 81 } | 83 } |
| 82 | 84 |
| 83 } // namespace | 85 } // namespace |
| 84 | 86 |
| 85 AttestationFlow::AttestationFlow(cryptohome::AsyncMethodCaller* async_caller, | 87 AttestationFlow::AttestationFlow(cryptohome::AsyncMethodCaller* async_caller, |
| 86 CryptohomeClient* cryptohome_client, | 88 CryptohomeClient* cryptohome_client, |
| 87 scoped_ptr<ServerProxy> server_proxy) | 89 scoped_ptr<ServerProxy> server_proxy) |
| 88 : async_caller_(async_caller), | 90 : async_caller_(async_caller), |
| 89 cryptohome_client_(cryptohome_client), | 91 cryptohome_client_(cryptohome_client), |
| 90 server_proxy_(server_proxy.Pass()), | 92 server_proxy_(std::move(server_proxy)), |
| 91 weak_factory_(this) { | 93 weak_factory_(this) {} |
| 92 } | |
| 93 | 94 |
| 94 AttestationFlow::~AttestationFlow() { | 95 AttestationFlow::~AttestationFlow() { |
| 95 } | 96 } |
| 96 | 97 |
| 97 void AttestationFlow::GetCertificate( | 98 void AttestationFlow::GetCertificate( |
| 98 AttestationCertificateProfile certificate_profile, | 99 AttestationCertificateProfile certificate_profile, |
| 99 const std::string& user_id, | 100 const std::string& user_id, |
| 100 const std::string& request_origin, | 101 const std::string& request_origin, |
| 101 bool force_new_key, | 102 bool force_new_key, |
| 102 const CertificateCallback& callback) { | 103 const CertificateCallback& callback) { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 304 } |
| 304 | 305 |
| 305 ServerProxy::~ServerProxy() {} | 306 ServerProxy::~ServerProxy() {} |
| 306 | 307 |
| 307 PrivacyCAType ServerProxy::GetType() { | 308 PrivacyCAType ServerProxy::GetType() { |
| 308 return DEFAULT_PCA; | 309 return DEFAULT_PCA; |
| 309 } | 310 } |
| 310 | 311 |
| 311 } // namespace attestation | 312 } // namespace attestation |
| 312 } // namespace chromeos | 313 } // namespace chromeos |
| OLD | NEW |