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

Issue 6677049: Comb up ownership things. (Closed)

Created:
9 years, 9 months ago by Denis Lagno
Modified:
9 years, 6 months ago
CC:
chromium-reviews, jam, nkostylev+cc_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Comb up ownership things. Current codebase contains race in using UserManager::current_user_is_owner() method. UserManager checks ownership asynchronously, so there is lapse of time when owner is logged in but UserManager::current_user_is_owner() returns false. In this CL this race is fixed for purpose of setting kOwnerLocale. Also: shorten lapse of time during which UserManager::current_user_is_owner() returns false for owner session: do this by making multi-threaded access to variable instead of posting another Task to message queue. Also: in r75988 http://codereview.chromium.org/6538098 OWNERSHIP_TAKEN notification was removed but observers of this notification were left as is. Fix it, convert observers to another notification. BUG=chromium-os:11212 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78353

Patch Set 1 : d #

Total comments: 6

Patch Set 2 : c #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -32 lines) Patch
M chrome/browser/chromeos/locale_change_guard.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/locale_change_guard.cc View 1 6 chunks +41 lines, -16 lines 0 comments Download
M chrome/browser/chromeos/login/ownership_service.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/ownership_service.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager.h View 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/user_manager.cc View 6 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/common/notification_type.h View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Denis Lagno
please take a look
9 years, 9 months ago (2011-03-15 18:51:28 UTC) #1
Chris Masone
user manager/owner manager chnages lgtm http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/login/ownership_service.h File chrome/browser/chromeos/login/ownership_service.h (right): http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/login/ownership_service.h#newcode12 chrome/browser/chromeos/login/ownership_service.h:12: #include "base/synchronization/lock.h" Is this ...
9 years, 9 months ago (2011-03-15 19:17:38 UTC) #2
Denis Lagno
http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/login/ownership_service.h File chrome/browser/chromeos/login/ownership_service.h (right): http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/login/ownership_service.h#newcode12 chrome/browser/chromeos/login/ownership_service.h:12: #include "base/synchronization/lock.h" On 2011/03/15 19:17:38, Chris Masone wrote: > ...
9 years, 9 months ago (2011-03-15 19:31:50 UTC) #3
Chris Masone
Then, thanks for fixing my code :-) On Tue, Mar 15, 2011 at 12:31 PM, ...
9 years, 9 months ago (2011-03-15 19:34:04 UTC) #4
altimofeev
http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/locale_change_guard.cc File chrome/browser/chromeos/locale_change_guard.cc (right): http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/locale_change_guard.cc#newcode91 chrome/browser/chromeos/locale_change_guard.cc:91: if (prefs == NULL) You can add NOTREACHED() here, ...
9 years, 9 months ago (2011-03-16 11:35:54 UTC) #5
Denis Lagno
http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/locale_change_guard.cc File chrome/browser/chromeos/locale_change_guard.cc (right): http://codereview.chromium.org/6677049/diff/4001/chrome/browser/chromeos/locale_change_guard.cc#newcode91 chrome/browser/chromeos/locale_change_guard.cc:91: if (prefs == NULL) On 2011/03/16 11:35:54, altimofeev wrote: ...
9 years, 9 months ago (2011-03-16 11:55:14 UTC) #6
altimofeev
9 years, 9 months ago (2011-03-16 12:04:25 UTC) #7
Thanks, LGTM!

Also, I would prefer to remove file "chrome/browser/profiles/profile_impl.cc"
from this CL (git reset, git checkout) to keep the history clean.

Powered by Google App Engine
This is Rietveld 408576698