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

Issue 1066453002: Refactor CryptAuth component to be more testable. (Closed)

Created:
5 years, 8 months ago by Tim Song
Modified:
5 years, 8 months ago
Reviewers:
Ilya Sherman
CC:
chromium-reviews, jochen (gone - plz use gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@cryptauth_securemessage
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor CryptAuth component to be more testable. Classes now implement interfaces, so it is easier to fake/mock them. BUG=420316 TEST=unit tests pass Committed: https://crrev.com/4cb782b03a941c849f32f189cee996076813452c Cr-Commit-Position: refs/heads/master@{#324303}

Patch Set 1 : #

Patch Set 2 : rebase #

Total comments: 10

Patch Set 3 : moved classes to impl files #

Total comments: 15

Patch Set 4 : fixes #

Patch Set 5 : update presubmit #

Patch Set 6 : rename tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -1308 lines) Patch
M chrome/browser/signin/easy_unlock_service_regular.cc View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth.gypi View 1 2 1 chunk +4 lines, -5 lines 0 comments Download
M components/proximity_auth/cryptauth/BUILD.gn View 1 2 3 4 5 2 chunks +6 lines, -7 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h View 1 2 3 4 5 3 chunks +9 lines, -9 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.cc View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl_unittest.cc View 1 2 3 4 5 4 chunks +8 lines, -8 lines 0 comments Download
D components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.h View 1 chunk +0 lines, -56 lines 0 comments Download
D components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.cc View 1 chunk +0 lines, -60 lines 0 comments Download
D components/proximity_auth/cryptauth/cryptauth_account_token_fetcher_unittest.cc View 1 chunk +0 lines, -75 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_api_call_flow.h View 2 chunks +5 lines, -3 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_api_call_flow.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client.h View 1 2 3 4 5 1 chunk +40 lines, -93 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client.cc View 1 chunk +0 lines, -175 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client_factory.h View 1 2 1 chunk +0 lines, -51 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client_factory.cc View 1 2 1 chunk +0 lines, -32 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_client_impl.h View 1 2 3 4 5 3 chunks +62 lines, -65 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_client_impl.cc View 1 2 6 chunks +52 lines, -31 lines 0 comments Download
A + components/proximity_auth/cryptauth/cryptauth_client_impl_unittest.cc View 1 2 3 4 5 7 chunks +19 lines, -45 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -569 lines 0 comments Download

Messages

Total messages: 21 (9 generated)
Tim Song
5 years, 8 months ago (2015-04-06 18:26:26 UTC) #4
Ilya Sherman
I really don't see any concrete improvements to the tests as a result of this ...
5 years, 8 months ago (2015-04-06 18:53:34 UTC) #5
Tim Song
I moved the implementation classes to their own files. Please take another look. https://codereview.chromium.org/1066453002/diff/60001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.cc File ...
5 years, 8 months ago (2015-04-06 23:21:17 UTC) #7
Ilya Sherman
Thanks. https://codereview.chromium.org/1066453002/diff/100001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h File components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h (right): https://codereview.chromium.org/1066453002/diff/100001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h#newcode11 components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h:11: #include "base/memory/scoped_ptr.h" nit: Not needed? https://codereview.chromium.org/1066453002/diff/100001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_unittest.cc File components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_unittest.cc ...
5 years, 8 months ago (2015-04-06 23:48:02 UTC) #8
Tim Song
https://codereview.chromium.org/1066453002/diff/100001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h File components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h (right): https://codereview.chromium.org/1066453002/diff/100001/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h#newcode11 components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h:11: #include "base/memory/scoped_ptr.h" On 2015/04/06 23:48:01, Ilya Sherman wrote: > ...
5 years, 8 months ago (2015-04-07 02:22:57 UTC) #9
Ilya Sherman
LGTM, thanks. In terms of the remaining comment, I'd prefer to change the presubmit check ...
5 years, 8 months ago (2015-04-07 22:04:50 UTC) #10
Tim Song
+jochen@ for PRESUBMIT.py What do you think of allowing a file with name file_*test.cc to ...
5 years, 8 months ago (2015-04-08 02:30:01 UTC) #12
jochen (gone - plz use gerrit)
On 2015/04/08 at 02:30:01, tengs wrote: > +jochen@ for PRESUBMIT.py > > What do you ...
5 years, 8 months ago (2015-04-08 15:20:49 UTC) #13
Tim Song
Okay, I renamed the tests and removed the PRESUBMIT.py changes.
5 years, 8 months ago (2015-04-08 17:51:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1066453002/180001
5 years, 8 months ago (2015-04-08 21:24:13 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:180001)
5 years, 8 months ago (2015-04-08 23:07:49 UTC) #20
commit-bot: I haz the power
5 years, 8 months ago (2015-04-08 23:08:52 UTC) #21
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/4cb782b03a941c849f32f189cee996076813452c
Cr-Commit-Position: refs/heads/master@{#324303}

Powered by Google App Engine
This is Rietveld 408576698