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

Issue 10332191: Remove TPMTokenInfoDelegate (Closed)

Created:
8 years, 7 months ago by hashimoto
Modified:
8 years, 7 months ago
Reviewers:
stevenjb, Ryan Sleevi
CC:
chromium-reviews, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Remove TPMTokenInfoDelegate to make TPM initialization code path simple Move Cryptohome D-Bus method calls to chromeos::CertLibrary BUG=125848 TEST=can login Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137646

Patch Set 1 : _ #

Total comments: 8

Patch Set 2 : Review fix #

Patch Set 3 : Rebase #

Patch Set 4 : Fix logic error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -255 lines) Patch
M chrome/browser/chromeos/cros/cert_library.cc View 1 15 chunks +79 lines, -152 lines 0 comments Download
M crypto/nss_util.h View 4 chunks +3 lines, -32 lines 0 comments Download
M crypto/nss_util.cc View 1 2 3 9 chunks +52 lines, -71 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
hashimoto
8 years, 7 months ago (2012-05-16 08:16:01 UTC) #1
stevenjb
cert_library changes lgtm
8 years, 7 months ago (2012-05-16 16:51:19 UTC) #2
Ryan Sleevi
crypto/ LGTM. A few style nits below, plus one (pre-existing) issue that can be addressed ...
8 years, 7 months ago (2012-05-16 17:02:16 UTC) #3
hashimoto
http://codereview.chromium.org/10332191/diff/2001/chrome/browser/chromeos/cros/cert_library.cc File chrome/browser/chromeos/cros/cert_library.cc (right): http://codereview.chromium.org/10332191/diff/2001/chrome/browser/chromeos/cros/cert_library.cc#newcode468 chrome/browser/chromeos/cros/cert_library.cc:468: << __FUNCTION__ << " should be called on UI ...
8 years, 7 months ago (2012-05-17 07:35:07 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hashimoto@chromium.org/10332191/11002
8 years, 7 months ago (2012-05-17 08:38:47 UTC) #5
commit-bot: I haz the power
Change committed as 137646
8 years, 7 months ago (2012-05-17 10:04:20 UTC) #6
Ryan Sleevi
8 years, 7 months ago (2012-05-17 17:09:45 UTC) #7
http://codereview.chromium.org/10332191/diff/2001/crypto/nss_util.cc
File crypto/nss_util.cc (right):

http://codereview.chromium.org/10332191/diff/2001/crypto/nss_util.cc#newcode381
crypto/nss_util.cc:381: if (!tpm_token_enabled_for_nss_) {
On 2012/05/17 07:35:07, hashimoto wrote:
> On 2012/05/16 17:02:16, Ryan Sleevi wrote:
> > Note: This is still thread-racey.
> > 
> > EnableTPMTokenForNSS is called on the UI or DBus thread by CertLibrary, but
> this
> Now EnableTPMTokenForNSS is called only on UI thread.
> 
> > is called on the IO thread (and the UI thread)
> 
> How would you like to solve this problem?
> Adding lock is not feasible because Wait() in UI thread is not allowed after
> http://crrev.com/134114.
> Are you planning to make this method called only from IO (or UI) thread?

I would prefer it only be called on the I/O thread, which is currently where all
crypto/NSS functions are delegated. Then, if we need to move to another thread
(as being discussed for CrOS), it's clear what the semantics will be.

You can use PostTaskAndReplyWithResult to post to the IO thread to query if it's
available, then get the result passed as an input to your callback function on
the origin thread (UI thread)

Powered by Google App Engine
This is Rietveld 408576698