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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.h

Issue 9466005: Make sure the device recovers from policy loss in the consumer case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT and cleaned up the unit tests. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual void SaveUserWallpaperIndex(int wallpaper_index) OVERRIDE; 67 virtual void SaveUserWallpaperIndex(int wallpaper_index) OVERRIDE;
68 virtual void SaveUserDefaultImageIndex(const std::string& username, 68 virtual void SaveUserDefaultImageIndex(const std::string& username,
69 int image_index) OVERRIDE; 69 int image_index) OVERRIDE;
70 virtual void SaveUserImage(const std::string& username, 70 virtual void SaveUserImage(const std::string& username,
71 const SkBitmap& image) OVERRIDE; 71 const SkBitmap& image) OVERRIDE;
72 virtual void SaveUserImageFromFile(const std::string& username, 72 virtual void SaveUserImageFromFile(const std::string& username,
73 const FilePath& path) OVERRIDE; 73 const FilePath& path) OVERRIDE;
74 virtual void SaveUserImageFromProfileImage( 74 virtual void SaveUserImageFromProfileImage(
75 const std::string& username) OVERRIDE; 75 const std::string& username) OVERRIDE;
76 virtual void DownloadProfileImage(const std::string& reason) OVERRIDE; 76 virtual void DownloadProfileImage(const std::string& reason) OVERRIDE;
77 virtual void LoadKeyStore() OVERRIDE;
77 virtual bool IsCurrentUserOwner() const OVERRIDE; 78 virtual bool IsCurrentUserOwner() const OVERRIDE;
78 virtual bool IsCurrentUserNew() const OVERRIDE; 79 virtual bool IsCurrentUserNew() const OVERRIDE;
79 virtual bool IsCurrentUserEphemeral() const OVERRIDE; 80 virtual bool IsCurrentUserEphemeral() const OVERRIDE;
80 virtual bool IsUserLoggedIn() const OVERRIDE; 81 virtual bool IsUserLoggedIn() const OVERRIDE;
81 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; 82 virtual bool IsLoggedInAsDemoUser() const OVERRIDE;
82 virtual bool IsLoggedInAsGuest() const OVERRIDE; 83 virtual bool IsLoggedInAsGuest() const OVERRIDE;
83 virtual bool IsLoggedInAsStub() const OVERRIDE; 84 virtual bool IsLoggedInAsStub() const OVERRIDE;
84 virtual void AddObserver(Observer* obs) OVERRIDE; 85 virtual void AddObserver(Observer* obs) OVERRIDE;
85 virtual void RemoveObserver(Observer* obs) OVERRIDE; 86 virtual void RemoveObserver(Observer* obs) OVERRIDE;
86 virtual void NotifyLocalStateChanged() OVERRIDE; 87 virtual void NotifyLocalStateChanged() OVERRIDE;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Cached flag of whether the currently logged-in user existed before this 223 // Cached flag of whether the currently logged-in user existed before this
223 // login. 224 // login.
224 bool is_current_user_new_; 225 bool is_current_user_new_;
225 226
226 // Cached flag of whether the currently logged-in user is ephemeral. Storage 227 // Cached flag of whether the currently logged-in user is ephemeral. Storage
227 // of persistent information is avoided for such users by not adding them to 228 // of persistent information is avoided for such users by not adding them to
228 // the user list in local state, not downloading their custom user images and 229 // the user list in local state, not downloading their custom user images and
229 // mounting their cryptohomes using tmpfs. 230 // mounting their cryptohomes using tmpfs.
230 bool is_current_user_ephemeral_; 231 bool is_current_user_ephemeral_;
231 232
233 // The key store for the current user has been loaded. This flag is needed to
234 // ensure that the key store will not be loaded twice in the policy recovery
235 // "safe-mode".
236 bool key_store_loaded_;
232 // Cached flag indicating whether ephemeral users are enabled. Defaults to 237 // Cached flag indicating whether ephemeral users are enabled. Defaults to
233 // |false| if the value has not been read from trusted device policy yet. 238 // |false| if the value has not been read from trusted device policy yet.
234 bool ephemeral_users_enabled_; 239 bool ephemeral_users_enabled_;
235 240
236 // Cached name of device owner. Defaults to empty string if the value has not 241 // Cached name of device owner. Defaults to empty string if the value has not
237 // been read from trusted device policy yet. 242 // been read from trusted device policy yet.
238 std::string owner_email_; 243 std::string owner_email_;
239 244
240 content::NotificationRegistrar registrar_; 245 content::NotificationRegistrar registrar_;
241 246
(...skipping 23 matching lines...) Expand all
265 270
266 // Data URL for |downloaded_profile_image_|. 271 // Data URL for |downloaded_profile_image_|.
267 std::string downloaded_profile_image_data_url_; 272 std::string downloaded_profile_image_data_url_;
268 273
269 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 274 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
270 }; 275 };
271 276
272 } // namespace chromeos 277 } // namespace chromeos
273 278
274 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 279 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.h ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698