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

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)

Created:
3 years, 10 months ago by Andrew T Wilson (Slow)
Modified:
3 years, 9 months ago
CC:
achuith+watch_chromium.org, alemate+watch_chromium.org, chromium-reviews, davemoore+watch_chromium.org, oshima+watch_chromium.org, rginda+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Track whether a given user session has completed initialization Start tracking user session initialization in local state and use that flag to determine whether to force a policy load instead of relying on the oauth token status. This is important because forcing a policy load when it's not strictly required can lock users out of their accounts. This flag is not persisted across restarts of ephemeral sessions (including crash-induced restarts) so policy code will force a policy reload after a crash (identical to previous ephemeral behavior, so no behavior change from this CL) BUG=684031 Review-Url: https://codereview.chromium.org/2711113003 Cr-Commit-Position: refs/heads/master@{#455727} Committed: https://chromium.googlesource.com/chromium/src/+/d5a7eabf41ff530632d5cd18b7136b52bbdc5f20

Patch Set 1 #

Patch Set 2 : Added tests. #

Total comments: 25

Patch Set 3 : Addressed review feedback - changed to use known_user #

Patch Set 4 : Cleaned up a few nits #

Patch Set 5 : Review feedback #

Total comments: 2

Patch Set 6 : Only expose known_user::RemovePrefsForTesting() for tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -12 lines) Patch
M chrome/browser/chromeos/login/screens/user_selection_screen.cc View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/users/user_manager_unittest.cc View 1 2 3 4 5 2 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc View 1 2 3 4 1 chunk +6 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_browsertest.cc View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M components/user_manager/fake_user_manager.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/user_manager/fake_user_manager.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M components/user_manager/known_user.h View 1 2 3 4 5 2 chunks +14 lines, -1 line 0 comments Download
M components/user_manager/known_user.cc View 1 2 3 4 5 3 chunks +24 lines, -0 lines 0 comments Download
M components/user_manager/user.h View 1 2 3 4 4 chunks +9 lines, -0 lines 0 comments Download
M components/user_manager/user_manager.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M components/user_manager/user_manager_base.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M components/user_manager/user_manager_base.cc View 1 2 3 4 4 chunks +14 lines, -1 line 0 comments Download
M components/user_manager/user_unittest.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (23 generated)
Andrew T Wilson (Slow)
alemate: ptal at user/user_manager stuff emaxx: ptal overall This CL is primarily to setup session_initialized() ...
3 years, 10 months ago (2017-02-23 17:27:03 UTC) #6
emaxx
https://codereview.chromium.org/2711113003/diff/20001/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc File chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc (right): https://codereview.chromium.org/2711113003/diff/20001/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc#newcode199 chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc:199: void FakeChromeUserManager::OnSessionInitialized(user_manager::User* user) { nit: Add an empty line ...
3 years, 10 months ago (2017-02-23 21:45:26 UTC) #7
Alexander Alekseev
https://codereview.chromium.org/2711113003/diff/20001/components/user_manager/user_manager_base.cc File components/user_manager/user_manager_base.cc (right): https://codereview.chromium.org/2711113003/diff/20001/components/user_manager/user_manager_base.cc#newcode288 components/user_manager/user_manager_base.cc:288: user_session_initialized->SetBooleanWithoutPathExpansion( We have known_user database for this. Could you ...
3 years, 10 months ago (2017-02-24 09:58:11 UTC) #8
Andrew T Wilson (Slow)
https://codereview.chromium.org/2711113003/diff/20001/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc File chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc (right): https://codereview.chromium.org/2711113003/diff/20001/chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc#newcode199 chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc:199: void FakeChromeUserManager::OnSessionInitialized(user_manager::User* user) { On 2017/02/23 21:45:25, emaxx wrote: ...
3 years, 10 months ago (2017-02-24 16:15:16 UTC) #9
Andrew T Wilson (Slow)
mlerman, ptal at chrome/browser/profiles alemate,emaxx: ptal - I believe I've addressed your feedback. Maksim, I'll ...
3 years, 10 months ago (2017-02-24 16:18:37 UTC) #14
Mike Lerman
Re-assigning to Anthony.
3 years, 10 months ago (2017-02-24 16:22:33 UTC) #16
anthonyvd
c/b/profiles lgtm
3 years, 10 months ago (2017-02-24 16:44:29 UTC) #19
emaxx
https://codereview.chromium.org/2711113003/diff/20001/components/user_manager/user_manager_base.cc File components/user_manager/user_manager_base.cc (right): https://codereview.chromium.org/2711113003/diff/20001/components/user_manager/user_manager_base.cc#newcode62 components/user_manager/user_manager_base.cc:62: const char kUserSessionInitialized[] = "UserSessionInitialized"; On 2017/02/24 16:15:15, Andrew ...
3 years, 10 months ago (2017-02-24 17:54:09 UTC) #22
Andrew T Wilson (Slow)
On 2017/02/24 17:54:09, emaxx wrote: > Maybe something like "UserProfileEverInitialized" or > "UserProfileWasInitializedOnce"? Lengthy, but ...
3 years, 10 months ago (2017-02-24 21:12:27 UTC) #23
emaxx
LGTM - leaving the final decision on the pref/method renaming to Drew and Alexander.
3 years, 9 months ago (2017-02-27 13:48:15 UTC) #25
Alexander Alekseev
On 2017/02/24 21:12:27, Andrew T Wilson (Slow) wrote: > On 2017/02/24 17:54:09, emaxx wrote: > ...
3 years, 9 months ago (2017-02-28 04:42:13 UTC) #26
Andrew T Wilson (Slow)
alemate: PTAL, I renamed the functions per our discussion.
3 years, 9 months ago (2017-03-08 10:32:17 UTC) #31
Alexander Alekseev
On 2017/03/08 10:32:17, Andrew T Wilson (Slow) wrote: > alemate: PTAL, I renamed the functions ...
3 years, 9 months ago (2017-03-09 01:57:29 UTC) #32
Alexander Alekseev
lgtm with nits actually ;) https://codereview.chromium.org/2711113003/diff/80001/components/user_manager/known_user.h File components/user_manager/known_user.h (right): https://codereview.chromium.org/2711113003/diff/80001/components/user_manager/known_user.h#newcode153 components/user_manager/known_user.h:153: void USER_MANAGER_EXPORT RemovePrefs(const AccountId& ...
3 years, 9 months ago (2017-03-09 02:04:04 UTC) #33
Andrew T Wilson (Slow)
https://codereview.chromium.org/2711113003/diff/80001/components/user_manager/known_user.h File components/user_manager/known_user.h (right): https://codereview.chromium.org/2711113003/diff/80001/components/user_manager/known_user.h#newcode153 components/user_manager/known_user.h:153: void USER_MANAGER_EXPORT RemovePrefs(const AccountId& account_id); On 2017/03/09 02:04:04, Alexander ...
3 years, 9 months ago (2017-03-09 12:33:15 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2711113003/100001
3 years, 9 months ago (2017-03-09 12:33:36 UTC) #37
commit-bot: I haz the power
3 years, 9 months ago (2017-03-09 13:19:27 UTC) #40
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/d5a7eabf41ff530632d5cd18b713...

Powered by Google App Engine
This is Rietveld 408576698