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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/chrome_notification_types.h" | 28 #include "chrome/browser/chrome_notification_types.h" |
29 #include "chrome/browser/chromeos/login/helper.h" | 29 #include "chrome/browser/chromeos/login/helper.h" |
30 #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h" | 30 #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h" |
31 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" | 31 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" |
32 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" | 32 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" |
33 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 33 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
34 #include "chrome/browser/profiles/profile_downloader.h" | 34 #include "chrome/browser/profiles/profile_downloader.h" |
35 #include "chrome/browser/profiles/profile_manager.h" | 35 #include "chrome/browser/profiles/profile_manager.h" |
36 #include "chrome/common/chrome_paths.h" | 36 #include "chrome/common/chrome_paths.h" |
37 #include "chrome/grit/theme_resources.h" | 37 #include "chrome/grit/theme_resources.h" |
| 38 #include "components/policy/policy_constants.h" |
38 #include "components/prefs/pref_registry_simple.h" | 39 #include "components/prefs/pref_registry_simple.h" |
39 #include "components/prefs/pref_service.h" | 40 #include "components/prefs/pref_service.h" |
40 #include "components/prefs/scoped_user_pref_update.h" | 41 #include "components/prefs/scoped_user_pref_update.h" |
41 #include "components/user_manager/user_image/user_image.h" | 42 #include "components/user_manager/user_image/user_image.h" |
42 #include "components/user_manager/user_manager.h" | 43 #include "components/user_manager/user_manager.h" |
43 #include "content/public/browser/browser_thread.h" | 44 #include "content/public/browser/browser_thread.h" |
44 #include "content/public/browser/notification_service.h" | 45 #include "content/public/browser/notification_service.h" |
45 #include "policy/policy_constants.h" | |
46 #include "ui/base/resource/resource_bundle.h" | 46 #include "ui/base/resource/resource_bundle.h" |
47 #include "ui/gfx/image/image_skia.h" | 47 #include "ui/gfx/image/image_skia.h" |
48 | 48 |
49 namespace chromeos { | 49 namespace chromeos { |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 // Delay betweeen user login and attempt to update user's profile data. | 53 // Delay betweeen user login and attempt to update user's profile data. |
54 const int kProfileDataDownloadDelaySec = 10; | 54 const int kProfileDataDownloadDelaySec = 10; |
55 | 55 |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 } | 963 } |
964 | 964 |
965 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const { | 965 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const { |
966 const user_manager::User* user = GetUser(); | 966 const user_manager::User* user = GetUser(); |
967 if (!user) | 967 if (!user) |
968 return false; | 968 return false; |
969 return user->is_logged_in() && user->HasGaiaAccount(); | 969 return user->is_logged_in() && user->HasGaiaAccount(); |
970 } | 970 } |
971 | 971 |
972 } // namespace chromeos | 972 } // namespace chromeos |
OLD | NEW |