| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <vector> | 10 #include <vector> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // The persistent list will be updated accordingly. | 67 // The persistent list will be updated accordingly. |
| 68 virtual void UserLoggedIn(const std::string& email); | 68 virtual void UserLoggedIn(const std::string& email); |
| 69 | 69 |
| 70 // Remove user from persistent list. NOTE: user's data won't be removed. | 70 // Remove user from persistent list. NOTE: user's data won't be removed. |
| 71 virtual void RemoveUser(const std::string& email); | 71 virtual void RemoveUser(const std::string& email); |
| 72 | 72 |
| 73 // Returns true if given user has logged into the device before. | 73 // Returns true if given user has logged into the device before. |
| 74 virtual bool IsKnownUser(const std::string& email); | 74 virtual bool IsKnownUser(const std::string& email); |
| 75 | 75 |
| 76 // Returns the logged-in user. | 76 // Returns the logged-in user. |
| 77 virtual const User& logged_in_user() { | 77 virtual User logged_in_user() const { |
| 78 return logged_in_user_; | 78 return logged_in_user_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Sets image for logged-in user and sends LOGIN_USER_IMAGE_CHANGED | 81 // Sets image for logged-in user and sends LOGIN_USER_IMAGE_CHANGED |
| 82 // notification about the image changed via NotificationService. | 82 // notification about the image changed via NotificationService. |
| 83 void SetLoggedInUserImage(const SkBitmap& image); | 83 void SetLoggedInUserImage(const SkBitmap& image); |
| 84 | 84 |
| 85 // Saves image to file and saves image path in local state preferences. | 85 // Saves image to file and saves image path in local state preferences. |
| 86 void SaveUserImage(const std::string& username, | 86 void SaveUserImage(const std::string& username, |
| 87 const SkBitmap& image); | 87 const SkBitmap& image); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 bool user_is_logged_in_; | 146 bool user_is_logged_in_; |
| 147 | 147 |
| 148 NotificationRegistrar registrar_; | 148 NotificationRegistrar registrar_; |
| 149 | 149 |
| 150 DISALLOW_COPY_AND_ASSIGN(UserManager); | 150 DISALLOW_COPY_AND_ASSIGN(UserManager); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace chromeos | 153 } // namespace chromeos |
| 154 | 154 |
| 155 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ | 155 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_MANAGER_H_ |
| OLD | NEW |