|
Tame the proliferation of UserContext constructors
UserContext offered a number of constructors aimed at specific use cases.
One of these ended up being used as a poor man's copy constructor that
took separate arguments to populate the various UserContext members. It
had already gotten out of sync with the full UserContext state (there are
8 members but this constructor copied only 6). The problem would likely
have become only worse in the future.
This CL replaces the existing constructors with a more well-defined set:
* A default constructor
* An actual copy constructor that copies all members
* A constructor that takes a |user_id|, which is required in almost all
cases
The copy constructor also replaces the ad-hoc CopyFrom() method.
AuthAttemptState also offered several constructors, two of which took
credentials in the form of a |user_context| while one took |username|
and |password| separately. The CL combines these into a single
constructor that always takes credentials as a |user_context|.
BUG= 367847
TEST=Updated unit and browser tests
TBR=pamg (chrome/browser/managed_mode/chromeos/manager_password_service.cc)
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271258
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+229 lines, -368 lines) |
Patch |
 |
M |
chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
View
|
1
2
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/extensions/screenlock_private_apitest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/auth_attempt_state.h
|
View
|
1
|
1 chunk |
+5 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/auth_attempt_state.cc
|
View
|
1
|
2 chunks |
+8 lines, -39 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/extended_authenticator.cc
|
View
|
1
|
3 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/login_performer.cc
|
View
|
1
|
3 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/mock_authenticator.cc
|
View
|
1
|
2 chunks |
+19 lines, -24 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/online_attempt_host.cc
|
View
|
1
|
2 chunks |
+6 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/online_attempt_unittest.cc
|
View
|
1
|
3 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/parallel_authenticator.cc
|
View
|
1
|
9 chunks |
+39 lines, -57 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/parallel_authenticator_unittest.cc
|
View
|
1
|
6 chunks |
+19 lines, -39 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/test_attempt_state.h
|
View
|
1
|
1 chunk |
+3 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/auth/test_attempt_state.cc
|
View
|
1
|
1 chunk |
+4 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/existing_user_controller.cc
|
View
|
1
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
|
View
|
1
|
8 chunks |
+23 lines, -20 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/lock/screen_locker.cc
|
View
|
1
|
1 chunk |
+1 line, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/login_manager_test.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/login_manager_test.cc
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/login_utils_browsertest.cc
|
View
|
1
|
1 chunk |
+10 lines, -13 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/managed/managed_user_creation_controller_new.cc
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/managed/supervised_user_authentication.cc
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/managed/supervised_user_login_flow.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
|
View
|
1
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/users/user.h
|
View
|
1
|
2 chunks |
+6 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/users/user.cc
|
View
|
1
2
|
5 chunks |
+25 lines, -45 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/users/user_manager_impl.cc
|
View
|
1
2
|
1 chunk |
+8 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/login/wizard_controller_browsertest.cc
|
View
|
1
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/managed_mode/chromeos/manager_password_service.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
|
View
|
1
|
2 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
Total messages: 11 (0 generated)
|