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

Side by Side Diff: chromeos/tpm_token_loader.cc

Issue 383593002: Add GetSystemNSSKeySlot, merge GetPrivateNSSKeySlot/GetPublicNSSKeySlot to GetPersistentNSSKeySlot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for comment #5 Created 6 years, 5 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
« no previous file with comments | « chrome/browser/net/nss_context_linux.cc ('k') | crypto/nss_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chromeos/tpm_token_loader.h" 5 #include "chromeos/tpm_token_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // and CryptohomeClient calls are not thread safe. 188 // and CryptohomeClient calls are not thread safe.
189 DBusThreadManager::Get()->GetCryptohomeClient()->Pkcs11GetTpmTokenInfo( 189 DBusThreadManager::Get()->GetCryptohomeClient()->Pkcs11GetTpmTokenInfo(
190 base::Bind(&TPMTokenLoader::OnPkcs11GetTpmTokenInfo, 190 base::Bind(&TPMTokenLoader::OnPkcs11GetTpmTokenInfo,
191 weak_factory_.GetWeakPtr())); 191 weak_factory_.GetWeakPtr()));
192 return; 192 return;
193 } 193 }
194 case TPM_TOKEN_INFO_RECEIVED: { 194 case TPM_TOKEN_INFO_RECEIVED: {
195 crypto_task_runner_->PostTask( 195 crypto_task_runner_->PostTask(
196 FROM_HERE, 196 FROM_HERE,
197 base::Bind( 197 base::Bind(
198 &crypto::InitializeTPMToken, 198 &crypto::InitializeTPMTokenAndSystemSlot,
199 tpm_token_slot_id_, 199 tpm_token_slot_id_,
200 base::Bind(&PostResultToTaskRunner, 200 base::Bind(&PostResultToTaskRunner,
201 base::MessageLoopProxy::current(), 201 base::MessageLoopProxy::current(),
202 base::Bind(&TPMTokenLoader::OnTPMTokenInitialized, 202 base::Bind(&TPMTokenLoader::OnTPMTokenInitialized,
203 weak_factory_.GetWeakPtr())))); 203 weak_factory_.GetWeakPtr()))));
204 return; 204 return;
205 } 205 }
206 case TPM_TOKEN_INITIALIZED: { 206 case TPM_TOKEN_INITIALIZED: {
207 NotifyTPMTokenReady(); 207 NotifyTPMTokenReady();
208 return; 208 return;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 void TPMTokenLoader::NotifyTPMTokenReady() { 284 void TPMTokenLoader::NotifyTPMTokenReady() {
285 FOR_EACH_OBSERVER(Observer, observers_, OnTPMTokenReady()); 285 FOR_EACH_OBSERVER(Observer, observers_, OnTPMTokenReady());
286 } 286 }
287 287
288 void TPMTokenLoader::LoggedInStateChanged() { 288 void TPMTokenLoader::LoggedInStateChanged() {
289 VLOG(1) << "LoggedInStateChanged"; 289 VLOG(1) << "LoggedInStateChanged";
290 MaybeStartTokenInitialization(); 290 MaybeStartTokenInitialization();
291 } 291 }
292 292
293 } // namespace chromeos 293 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/net/nss_context_linux.cc ('k') | crypto/nss_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698