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/cryptohome/async_method_caller.h" | 5 #include "chromeos/cryptohome/async_method_caller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const Callback& callback) OVERRIDE { | 115 const Callback& callback) OVERRIDE { |
116 DBusThreadManager::Get()->GetCryptohomeClient()-> | 116 DBusThreadManager::Get()->GetCryptohomeClient()-> |
117 AsyncTpmAttestationEnroll(pca_response, base::Bind( | 117 AsyncTpmAttestationEnroll(pca_response, base::Bind( |
118 &AsyncMethodCallerImpl::RegisterAsyncCallback, | 118 &AsyncMethodCallerImpl::RegisterAsyncCallback, |
119 weak_ptr_factory_.GetWeakPtr(), | 119 weak_ptr_factory_.GetWeakPtr(), |
120 callback, | 120 callback, |
121 "Couldn't initiate async attestation enroll.")); | 121 "Couldn't initiate async attestation enroll.")); |
122 } | 122 } |
123 | 123 |
124 virtual void AsyncTpmAttestationCreateCertRequest( | 124 virtual void AsyncTpmAttestationCreateCertRequest( |
125 int options, | 125 int certificate_profile, |
| 126 const std::string& username, |
| 127 const std::string& request_origin, |
126 const DataCallback& callback) OVERRIDE { | 128 const DataCallback& callback) OVERRIDE { |
127 DBusThreadManager::Get()->GetCryptohomeClient()-> | 129 DBusThreadManager::Get()->GetCryptohomeClient()-> |
128 AsyncTpmAttestationCreateCertRequest( | 130 AsyncTpmAttestationCreateCertRequest( |
129 options, | 131 certificate_profile, |
| 132 username, |
| 133 request_origin, |
130 base::Bind(&AsyncMethodCallerImpl::RegisterAsyncDataCallback, | 134 base::Bind(&AsyncMethodCallerImpl::RegisterAsyncDataCallback, |
131 weak_ptr_factory_.GetWeakPtr(), | 135 weak_ptr_factory_.GetWeakPtr(), |
132 callback, | 136 callback, |
133 "Couldn't initiate async attestation cert request.")); | 137 "Couldn't initiate async attestation cert request.")); |
134 } | 138 } |
135 | 139 |
136 virtual void AsyncTpmAttestationFinishCertRequest( | 140 virtual void AsyncTpmAttestationFinishCertRequest( |
137 const std::string& pca_response, | 141 const std::string& pca_response, |
138 chromeos::attestation::AttestationKeyType key_type, | 142 chromeos::attestation::AttestationKeyType key_type, |
139 const std::string& key_name, | 143 const std::string& key_name, |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 g_async_method_caller = NULL; | 354 g_async_method_caller = NULL; |
351 VLOG(1) << "AsyncMethodCaller Shutdown completed"; | 355 VLOG(1) << "AsyncMethodCaller Shutdown completed"; |
352 } | 356 } |
353 | 357 |
354 // static | 358 // static |
355 AsyncMethodCaller* AsyncMethodCaller::GetInstance() { | 359 AsyncMethodCaller* AsyncMethodCaller::GetInstance() { |
356 return g_async_method_caller; | 360 return g_async_method_caller; |
357 } | 361 } |
358 | 362 |
359 } // namespace cryptohome | 363 } // namespace cryptohome |
OLD | NEW |