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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "base/values.h" | 23 #include "base/values.h" |
24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/chrome_notification_types.h" | 25 #include "chrome/browser/chrome_notification_types.h" |
26 #include "chrome/browser/chromeos/login/helper.h" | 26 #include "chrome/browser/chromeos/login/helper.h" |
27 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" | 27 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" |
28 #include "chrome/browser/chromeos/login/users/user_manager.h" | 28 #include "chrome/browser/chromeos/login/users/user_manager.h" |
29 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
30 #include "chrome/browser/profiles/profile_downloader.h" | 30 #include "chrome/browser/profiles/profile_downloader.h" |
31 #include "chrome/browser/profiles/profile_manager.h" | 31 #include "chrome/browser/profiles/profile_manager.h" |
32 #include "chrome/common/chrome_paths.h" | 32 #include "chrome/common/chrome_paths.h" |
| 33 #include "chrome/grit/theme_resources.h" |
33 #include "components/user_manager/user_image/default_user_images.h" | 34 #include "components/user_manager/user_image/default_user_images.h" |
34 #include "components/user_manager/user_image/user_image.h" | 35 #include "components/user_manager/user_image/user_image.h" |
35 #include "components/user_manager/user_type.h" | 36 #include "components/user_manager/user_type.h" |
36 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
37 #include "content/public/browser/notification_service.h" | 38 #include "content/public/browser/notification_service.h" |
38 #include "grit/theme_resources.h" | |
39 #include "policy/policy_constants.h" | 39 #include "policy/policy_constants.h" |
40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
41 #include "ui/gfx/image/image_skia.h" | 41 #include "ui/gfx/image/image_skia.h" |
42 | 42 |
43 namespace chromeos { | 43 namespace chromeos { |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 // A dictionary that maps user_ids to old user image data with images stored in | 47 // A dictionary that maps user_ids to old user image data with images stored in |
48 // PNG format. Deprecated. | 48 // PNG format. Deprecated. |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 | 1019 |
1020 bool UserImageManagerImpl::IsUserLoggedInAndRegular() const { | 1020 bool UserImageManagerImpl::IsUserLoggedInAndRegular() const { |
1021 const user_manager::User* user = GetUser(); | 1021 const user_manager::User* user = GetUser(); |
1022 if (!user) | 1022 if (!user) |
1023 return false; | 1023 return false; |
1024 return user->is_logged_in() && | 1024 return user->is_logged_in() && |
1025 user->GetType() == user_manager::USER_TYPE_REGULAR; | 1025 user->GetType() == user_manager::USER_TYPE_REGULAR; |
1026 } | 1026 } |
1027 | 1027 |
1028 } // namespace chromeos | 1028 } // namespace chromeos |
OLD | NEW |