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

Issue 3407008: [Chrome OS] Infrastucture for doing offline/online login simultaneously (Closed)

Created:
10 years, 3 months ago by Chris Masone
Modified:
9 years, 7 months ago
CC:
chromium-reviews, nkostylev+cc_chromium.org, davemoore+watch_chromium.org, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

[Chrome OS] Infrastucture for doing offline/online login simultaneously These are meant to wrap and replace large chunks of code in GoogleAuthenticator, once I rewrite that code to do offline and online login at the same time. That's why there's some code that's still in GoogleAuthenticator that's refactored into some of these classes. Essentially, one creates an AuthAttemptState object, which will only allow its mutable contents to be read/written on the IO thread. Then, you pass it to an OnlineAttempt which, when done, stores results in the AuthAttemptState. You can do the same thing with the various CryptohomeOp classes. They call out over DBus to asynchronously do stuff with the user's cryptohome and then, when the callbacks come in, these object post a call over to the IO thread to update the contents of the AuthAttemptState instance they're holding on to. BUG=chromium-os:4929 TEST=unit testss

Patch Set 1 #

Patch Set 2 : remove refcounting from AuthAttemptStateResolver (not needed anymore) #

Total comments: 1

Patch Set 3 : move io_thread_.Start() for phajdan #

Total comments: 22

Patch Set 4 : address comments per davemoore #

Patch Set 5 : add missing files #

Patch Set 6 : re-up due to 500 errors #

Patch Set 7 : re-upload (again) due to 500s #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1401 lines, -43 lines) Patch
M chrome/browser/chromeos/cros/mock_cryptohome_library.h View 2 chunks +50 lines, -1 line 0 comments Download
A chrome/browser/chromeos/login/auth_attempt_state.h View 1 2 3 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/auth_attempt_state.cc View 1 2 3 1 chunk +88 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/auth_attempt_state_resolver.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/auth_attempt_state_resolver.cc View 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/cryptohome_op.h View 1 2 3 1 chunk +102 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/cryptohome_op.cc View 1 chunk +122 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/cryptohome_op_unittest.cc View 1 2 3 1 chunk +226 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/google_authenticator_unittest.cc View 2 chunks +1 line, -36 lines 0 comments Download
M chrome/browser/chromeos/login/login_status_consumer.h View 2 chunks +5 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/mock_auth_attempt_state_resolver.h View 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/mock_url_fetchers.h View 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/mock_url_fetchers.cc View 1 chunk +67 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/online_attempt.h View 1 2 3 1 chunk +71 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/online_attempt.cc View 1 1 chunk +124 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/online_attempt_unittest.cc View 1 2 3 1 chunk +230 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/test_attempt_state.h View 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/test_attempt_state.cc View 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 chunks +16 lines, -6 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Chris Masone
10 years, 3 months ago (2010-09-18 22:30:21 UTC) #1
Paweł Hajdan Jr.
Drive-by with a test comment. http://codereview.chromium.org/3407008/diff/1018/3015 File chrome/browser/chromeos/login/online_attempt_unittest.cc (right): http://codereview.chromium.org/3407008/diff/1018/3015#newcode134 chrome/browser/chromeos/login/online_attempt_unittest.cc:134: io_thread_.Start(); Can we always ...
10 years, 3 months ago (2010-09-20 11:56:04 UTC) #2
Chris Masone
On Mon, Sep 20, 2010 at 4:56 AM, <phajdan.jr@chromium.org> wrote: > Drive-by with a test ...
10 years, 3 months ago (2010-09-20 14:40:42 UTC) #3
Paweł Hajdan Jr.
I'd prefer posting a task to the IO thread that will signal a WaitableEvent, and ...
10 years, 3 months ago (2010-09-20 14:58:23 UTC) #4
Chris Masone
On Mon, Sep 20, 2010 at 7:58 AM, <phajdan.jr@chromium.org> wrote: > I'd prefer posting a ...
10 years, 3 months ago (2010-09-20 15:07:27 UTC) #5
Chris Masone
Changed per convo on IRC. PTAL On 2010/09/20 15:07:27, Chris Masone wrote: > On Mon, ...
10 years, 3 months ago (2010-09-20 16:04:05 UTC) #6
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM.
10 years, 3 months ago (2010-09-20 16:32:04 UTC) #7
Chris Masone
On 2010/09/20 16:32:04, Paweł Hajdan Jr. wrote: > Code I commented in the drive-by LGTM. ...
10 years, 3 months ago (2010-09-21 15:53:51 UTC) #8
DaveMoore
http://codereview.chromium.org/3407008/diff/9001/10003 File chrome/browser/chromeos/login/auth_attempt_state.h (right): http://codereview.chromium.org/3407008/diff/9001/10003#newcode32 chrome/browser/chromeos/login/auth_attempt_state.h:32: void RecordOnlineLoginStatus( Please comment the public and protected methods. ...
10 years, 3 months ago (2010-09-21 18:42:40 UTC) #9
Chris Masone
Thanks, Dave. PTAL http://codereview.chromium.org/3407008/diff/9001/10003 File chrome/browser/chromeos/login/auth_attempt_state.h (right): http://codereview.chromium.org/3407008/diff/9001/10003#newcode32 chrome/browser/chromeos/login/auth_attempt_state.h:32: void RecordOnlineLoginStatus( On 2010/09/21 18:42:40, davemoore ...
10 years, 3 months ago (2010-09-22 01:29:35 UTC) #10
DaveMoore
10 years, 3 months ago (2010-09-22 14:09:51 UTC) #11
LGTM

Powered by Google App Engine
This is Rietveld 408576698