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

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: Now with proper testing. 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const std::string& username) const OVERRIDE; 62 const std::string& username) const OVERRIDE;
63 virtual void SaveUserDefaultImageIndex(const std::string& username, 63 virtual void SaveUserDefaultImageIndex(const std::string& username,
64 int image_index) OVERRIDE; 64 int image_index) OVERRIDE;
65 virtual void SaveUserImage(const std::string& username, 65 virtual void SaveUserImage(const std::string& username,
66 const SkBitmap& image) OVERRIDE; 66 const SkBitmap& image) OVERRIDE;
67 virtual void SaveUserImageFromFile(const std::string& username, 67 virtual void SaveUserImageFromFile(const std::string& username,
68 const FilePath& path) OVERRIDE; 68 const FilePath& path) OVERRIDE;
69 virtual void SaveUserImageFromProfileImage( 69 virtual void SaveUserImageFromProfileImage(
70 const std::string& username) OVERRIDE; 70 const std::string& username) OVERRIDE;
71 virtual void DownloadProfileImage(const std::string& reason) OVERRIDE; 71 virtual void DownloadProfileImage(const std::string& reason) OVERRIDE;
72 virtual void LoadKeyStore() OVERRIDE;
72 virtual bool IsCurrentUserOwner() const OVERRIDE; 73 virtual bool IsCurrentUserOwner() const OVERRIDE;
73 virtual bool IsCurrentUserNew() const OVERRIDE; 74 virtual bool IsCurrentUserNew() const OVERRIDE;
74 virtual bool IsUserLoggedIn() const OVERRIDE; 75 virtual bool IsUserLoggedIn() const OVERRIDE;
75 virtual bool IsLoggedInAsDemoUser() const OVERRIDE; 76 virtual bool IsLoggedInAsDemoUser() const OVERRIDE;
76 virtual bool IsLoggedInAsGuest() const OVERRIDE; 77 virtual bool IsLoggedInAsGuest() const OVERRIDE;
77 virtual void AddObserver(Observer* obs) OVERRIDE; 78 virtual void AddObserver(Observer* obs) OVERRIDE;
78 virtual void RemoveObserver(Observer* obs) OVERRIDE; 79 virtual void RemoveObserver(Observer* obs) OVERRIDE;
79 virtual void NotifyLocalStateChanged() OVERRIDE; 80 virtual void NotifyLocalStateChanged() OVERRIDE;
80 virtual const SkBitmap& DownloadedProfileImage() const OVERRIDE; 81 virtual const SkBitmap& DownloadedProfileImage() const OVERRIDE;
81 82
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool is_current_user_owner_; 200 bool is_current_user_owner_;
200 mutable base::Lock is_current_user_owner_lock_; 201 mutable base::Lock is_current_user_owner_lock_;
201 202
202 // Cached flag of whether the currently logged-in user existed before this 203 // Cached flag of whether the currently logged-in user existed before this
203 // login. 204 // login.
204 bool is_current_user_new_; 205 bool is_current_user_new_;
205 206
206 // Cached flag of whether any user is logged in at the moment. 207 // Cached flag of whether any user is logged in at the moment.
207 bool is_user_logged_in_; 208 bool is_user_logged_in_;
208 209
210 // The key store for the current user has been loaded. This flag is needed to
211 // ensure that the key store will not be loaded twice in the policy recovery
212 // "safe-mode".
213 bool key_store_loaded_;
214
209 content::NotificationRegistrar registrar_; 215 content::NotificationRegistrar registrar_;
210 216
211 // Profile sync service which is observed to take actions after sync 217 // Profile sync service which is observed to take actions after sync
212 // errors appear. NOTE: there is no guarantee that it is the current sync 218 // errors appear. NOTE: there is no guarantee that it is the current sync
213 // service, so do NOT use it outside |OnStateChanged| method. 219 // service, so do NOT use it outside |OnStateChanged| method.
214 ProfileSyncService* observed_sync_service_; 220 ProfileSyncService* observed_sync_service_;
215 221
216 ObserverList<Observer> observer_list_; 222 ObserverList<Observer> observer_list_;
217 223
218 // Download user profile image on login to update it if it's changed. 224 // Download user profile image on login to update it if it's changed.
(...skipping 15 matching lines...) Expand all
234 240
235 // Data URL for |downloaded_profile_image_|. 241 // Data URL for |downloaded_profile_image_|.
236 std::string downloaded_profile_image_data_url_; 242 std::string downloaded_profile_image_data_url_;
237 243
238 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl); 244 DISALLOW_COPY_AND_ASSIGN(UserManagerImpl);
239 }; 245 };
240 246
241 } // namespace chromeos 247 } // namespace chromeos
242 248
243 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_ 249 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698