Turn UserContext into a class with explicit getters and setters
Until now, UserContext was a struct with public members. This led to code
manipulating the UserContext state in ways that were impossible to keep
track of.
This CL is a first step toward making UserContext more robust. Right now,
many places in the code make copies of a UserContext by calling one of the
UserContext constructors. These constructors copy only a subset of the
state. It is never clear whether such partial copies are intentional or
accidental. A follow-up CL will address this by adjusting each place where
a copy of a UserContext is made.
BUG=367847
TEST=Updated browser and unit tests
TBR=xiyuan (chrome/browser/chromeos/app_mode/kiosk_profile_loader.cc)
TBR=pamg (chrome/browser/managed_mode/chromeos/manager_password_service.cc)
Review URL: https://codereview.chromium.org/
280883004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270689 0039d316-1c4b-4281-b951-d872f2087c98