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

Side by Side Diff: chromeos/cryptohome/async_method_caller.cc

Issue 20873002: Added support for the content protection profile to AttestationFlow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 months 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 | Annotate | Revision Log
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const Callback& callback) OVERRIDE { 126 const Callback& callback) OVERRIDE {
127 DBusThreadManager::Get()->GetCryptohomeClient()-> 127 DBusThreadManager::Get()->GetCryptohomeClient()->
128 AsyncTpmAttestationEnroll(pca_response, base::Bind( 128 AsyncTpmAttestationEnroll(pca_response, base::Bind(
129 &AsyncMethodCallerImpl::RegisterAsyncCallback, 129 &AsyncMethodCallerImpl::RegisterAsyncCallback,
130 weak_ptr_factory_.GetWeakPtr(), 130 weak_ptr_factory_.GetWeakPtr(),
131 callback, 131 callback,
132 "Couldn't initiate async attestation enroll.")); 132 "Couldn't initiate async attestation enroll."));
133 } 133 }
134 134
135 virtual void AsyncTpmAttestationCreateCertRequest( 135 virtual void AsyncTpmAttestationCreateCertRequest(
136 int options, 136 chromeos::attestation::AttestationCertificateProfile certificate_profile,
137 const std::string& username,
138 const std::string& request_origin,
137 const DataCallback& callback) OVERRIDE { 139 const DataCallback& callback) OVERRIDE {
138 DBusThreadManager::Get()->GetCryptohomeClient()-> 140 DBusThreadManager::Get()->GetCryptohomeClient()->
139 AsyncTpmAttestationCreateCertRequest( 141 AsyncTpmAttestationCreateCertRequest(
140 options, 142 certificate_profile,
143 username,
144 request_origin,
141 base::Bind(&AsyncMethodCallerImpl::RegisterAsyncDataCallback, 145 base::Bind(&AsyncMethodCallerImpl::RegisterAsyncDataCallback,
142 weak_ptr_factory_.GetWeakPtr(), 146 weak_ptr_factory_.GetWeakPtr(),
143 callback, 147 callback,
144 "Couldn't initiate async attestation cert request.")); 148 "Couldn't initiate async attestation cert request."));
145 } 149 }
146 150
147 virtual void AsyncTpmAttestationFinishCertRequest( 151 virtual void AsyncTpmAttestationFinishCertRequest(
148 const std::string& pca_response, 152 const std::string& pca_response,
149 chromeos::attestation::AttestationKeyType key_type, 153 chromeos::attestation::AttestationKeyType key_type,
150 const std::string& key_name, 154 const std::string& key_name,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 g_async_method_caller = NULL; 365 g_async_method_caller = NULL;
362 VLOG(1) << "AsyncMethodCaller Shutdown completed"; 366 VLOG(1) << "AsyncMethodCaller Shutdown completed";
363 } 367 }
364 368
365 // static 369 // static
366 AsyncMethodCaller* AsyncMethodCaller::GetInstance() { 370 AsyncMethodCaller* AsyncMethodCaller::GetInstance() {
367 return g_async_method_caller; 371 return g_async_method_caller;
368 } 372 }
369 373
370 } // namespace cryptohome 374 } // namespace cryptohome
OLDNEW
« no previous file with comments | « chromeos/cryptohome/async_method_caller.h ('k') | chromeos/cryptohome/mock_async_method_caller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698