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

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed)

Created:
6 years, 4 months ago by dzhioev (left Google)
Modified:
6 years, 4 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, sadrul, nkostylev+watch_chromium.org, tfarina, yoshiki+watch_chromium.org, rginda+watch_chromium.org, pam+watch_chromium.org, ben+ash_chromium.org, oshima+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. Created safe alternative which is called GetProfileByUser. The plan is to investigate all usages of GetProfileByUserUnsafe one by one and replace them with a safe version, if possible. Also warning message added for cases when GetProfileByUserUnsafe returns profile of a wrong user or signin profile. That will help us to detect suspicious calls to GetProfileByUserUnsafe while work in progress. BUG=361528 TBR=yoz,dcheng,agl,dewittj,skuhne,derat Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289011

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Rebased. #

Total comments: 7

Patch Set 4 : Comments addressed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -57 lines) Patch
M chrome/browser/chromeos/drive/drive_notification_manager_factory_browsertest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/first_run/first_run.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/first_run/first_run_controller.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/fake_login_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/saml/saml_browsertest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/screens/user_image_screen.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/session/user_session_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/ui/user_adding_screen_browsertest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/chrome_user_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/users/multi_profile_user_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/ownership/owner_settings_service_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/preferences_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/profiles/profile_helper.h View 1 2 1 chunk +12 lines, -1 line 0 comments Download
M chrome/browser/chromeos/profiles/profile_helper.cc View 1 2 3 2 chunks +29 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_assets_manager_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_garbage_collector_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/net/nss_context_chromeos_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/notifications/message_center_settings_controller.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/session_state_delegate_chromeos.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc View 3 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
dzhioev (left Google)
Hi, please review. WARNING appears only once, on the beginning of user session. I'll fix ...
6 years, 4 months ago (2014-08-07 19:43:45 UTC) #1
Nikita (slow)
lgtm but please remove this warning message since it will fill users log files with ...
6 years, 4 months ago (2014-08-11 12:29:24 UTC) #2
Thiemo Nagel
That looks extremely good to me. Thanks a lot Pavel! LGTM with nits.
6 years, 4 months ago (2014-08-11 14:39:47 UTC) #3
Thiemo Nagel
https://codereview.chromium.org/445353004/diff/40001/chrome/browser/chromeos/profiles/profile_helper.cc File chrome/browser/chromeos/profiles/profile_helper.cc (right): https://codereview.chromium.org/445353004/diff/40001/chrome/browser/chromeos/profiles/profile_helper.cc#newcode246 chrome/browser/chromeos/profiles/profile_helper.cc:246: if (user->is_profile_created()) Nit: I think it would be more ...
6 years, 4 months ago (2014-08-11 14:39:54 UTC) #4
dzhioev (left Google)
https://codereview.chromium.org/445353004/diff/40001/chrome/browser/chromeos/profiles/profile_helper.cc File chrome/browser/chromeos/profiles/profile_helper.cc (right): https://codereview.chromium.org/445353004/diff/40001/chrome/browser/chromeos/profiles/profile_helper.cc#newcode246 chrome/browser/chromeos/profiles/profile_helper.cc:246: if (user->is_profile_created()) On 2014/08/11 14:39:54, Thiemo Nagel wrote: > ...
6 years, 4 months ago (2014-08-12 14:56:28 UTC) #5
dzhioev (left Google)
The CQ bit was checked by dzhioev@chromium.org
6 years, 4 months ago (2014-08-12 14:57:04 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dzhioev@chromium.org/445353004/60001
6 years, 4 months ago (2014-08-12 14:58:05 UTC) #7
dzhioev (left Google)
The CQ bit was unchecked by dzhioev@chromium.org
6 years, 4 months ago (2014-08-12 15:06:26 UTC) #8
dzhioev (left Google)
The CQ bit was checked by dzhioev@chromium.org
6 years, 4 months ago (2014-08-12 15:06:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dzhioev@chromium.org/445353004/60001
6 years, 4 months ago (2014-08-12 15:11:02 UTC) #10
commit-bot: I haz the power
6 years, 4 months ago (2014-08-12 17:18:30 UTC) #11
Message was sent while issue was closed.
Change committed as 289011

Powered by Google App Engine
This is Rietveld 408576698