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

Unified Diff: chrome/browser/chromeos/login/user_manager.h

Issue 6677049: Comb up ownership things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/ownership_service.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager.h
diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h
index 19f0f7f9d3c7894c528fcdaf9bd316b2d386caa5..6a542eb09c3c05c0d4720842e8b21254e45ad51a 100644
--- a/chrome/browser/chromeos/login/user_manager.h
+++ b/chrome/browser/chromeos/login/user_manager.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/ref_counted.h"
+#include "base/synchronization/lock.h"
#include "chrome/browser/chromeos/login/user_image_loader.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
@@ -20,6 +21,10 @@
class FilePath;
class PrefService;
+namespace base {
+template<typename> struct DefaultLazyInstanceTraits;
+}
+
namespace chromeos {
class RemoveUserDelegate;
@@ -149,7 +154,9 @@ class UserManager : public UserImageLoader::Delegate,
User logged_in_user_;
// Cached flag of whether currently logged-in user is owner or not.
+ // May be accessed on different threads, requires locking.
bool current_user_is_owner_;
+ mutable base::Lock current_user_is_owner_lock_;
// Cached flag of whether the currently logged-in user existed before this
// login.
@@ -160,6 +167,8 @@ class UserManager : public UserImageLoader::Delegate,
NotificationRegistrar registrar_;
+ friend struct base::DefaultLazyInstanceTraits<UserManager>;
+
DISALLOW_COPY_AND_ASSIGN(UserManager);
};
« no previous file with comments | « chrome/browser/chromeos/login/ownership_service.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698