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

Side by Side Diff: chrome/browser/chromeos/login/user_manager.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: Created 8 years, 10 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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // is downloaded successfuly. 115 // is downloaded successfuly.
116 void SaveUserImageFromProfileImage(const std::string& username); 116 void SaveUserImageFromProfileImage(const std::string& username);
117 117
118 // Starts downloading the profile image for the logged-in user. 118 // Starts downloading the profile image for the logged-in user.
119 // If user's image index is |kProfileImageIndex|, newly downloaded image 119 // If user's image index is |kProfileImageIndex|, newly downloaded image
120 // is immediately set as user's current picture. 120 // is immediately set as user's current picture.
121 // |reason| is an arbitraty string (used to report UMA histograms with 121 // |reason| is an arbitraty string (used to report UMA histograms with
122 // download times). 122 // download times).
123 void DownloadProfileImage(const std::string& reason); 123 void DownloadProfileImage(const std::string& reason);
124 124
125 // Loads the key/certificates database for the current logged in user.
126 void LoadKeyStore();
127
125 // content::NotificationObserver implementation. 128 // content::NotificationObserver implementation.
126 virtual void Observe(int type, 129 virtual void Observe(int type,
127 const content::NotificationSource& source, 130 const content::NotificationSource& source,
128 const content::NotificationDetails& details) OVERRIDE; 131 const content::NotificationDetails& details) OVERRIDE;
129 132
130 // ProfileSyncServiceObserver implementation. 133 // ProfileSyncServiceObserver implementation.
131 virtual void OnStateChanged() OVERRIDE; 134 virtual void OnStateChanged() OVERRIDE;
132 135
133 // Accessor for current_user_is_owner_ 136 // Accessor for current_user_is_owner_
134 virtual bool current_user_is_owner() const; 137 virtual bool current_user_is_owner() const;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 bool current_user_is_owner_; 274 bool current_user_is_owner_;
272 mutable base::Lock current_user_is_owner_lock_; 275 mutable base::Lock current_user_is_owner_lock_;
273 276
274 // Cached flag of whether the currently logged-in user existed before this 277 // Cached flag of whether the currently logged-in user existed before this
275 // login. 278 // login.
276 bool current_user_is_new_; 279 bool current_user_is_new_;
277 280
278 // Cached flag of whether any user is logged in at the moment. 281 // Cached flag of whether any user is logged in at the moment.
279 bool user_is_logged_in_; 282 bool user_is_logged_in_;
280 283
284 bool key_store_loaded_;
285
281 content::NotificationRegistrar registrar_; 286 content::NotificationRegistrar registrar_;
282 287
283 // Profile sync service which is observed to take actions after sync 288 // Profile sync service which is observed to take actions after sync
284 // errors appear. NOTE: there is no guarantee that it is the current sync 289 // errors appear. NOTE: there is no guarantee that it is the current sync
285 // service, so do NOT use it outside |OnStateChanged| method. 290 // service, so do NOT use it outside |OnStateChanged| method.
286 ProfileSyncService* observed_sync_service_; 291 ProfileSyncService* observed_sync_service_;
287 292
288 friend struct base::DefaultLazyInstanceTraits<UserManager>; 293 friend struct base::DefaultLazyInstanceTraits<UserManager>;
289 294
290 ObserverList<Observer> observer_list_; 295 ObserverList<Observer> observer_list_;
(...skipping 17 matching lines...) Expand all
308 313
309 // Data URL for |downloaded_profile_image_|. 314 // Data URL for |downloaded_profile_image_|.
310 std::string downloaded_profile_image_data_url_; 315 std::string downloaded_profile_image_data_url_;
311 316
312 DISALLOW_COPY_AND_ASSIGN(UserManager); 317 DISALLOW_COPY_AND_ASSIGN(UserManager);
313 }; 318 };
314 319
315 } // namespace chromeos 320 } // namespace chromeos
316 321
317 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ 322 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698