| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 user_manager::User* UserImageManagerImpl::GetUserAndModify() const { | 1018 user_manager::User* UserImageManagerImpl::GetUserAndModify() const { |
| 1019 return user_manager_->FindUserAndModify(user_id()); | 1019 return user_manager_->FindUserAndModify(user_id()); |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 bool UserImageManagerImpl::IsUserLoggedInAndRegular() const { | 1022 bool UserImageManagerImpl::IsUserLoggedInAndRegular() const { |
| 1023 const user_manager::User* user = GetUser(); | 1023 const user_manager::User* user = GetUser(); |
| 1024 if (!user) | 1024 if (!user) |
| 1025 return false; | 1025 return false; |
| 1026 return user->is_logged_in() && | 1026 return user->is_logged_in() && user->IsRegular(); |
| 1027 user->GetType() == user_manager::USER_TYPE_REGULAR; | |
| 1028 } | 1027 } |
| 1029 | 1028 |
| 1030 } // namespace chromeos | 1029 } // namespace chromeos |
| OLD | NEW |